Fix prompt-audit template marker false positive guidance - #470
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot move the workflow to the right location in the repo |
|
@strawgate I've opened a new pull request, #471, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughA workflow file's documentation comment is updated to remove a literal placeholder pattern example, replacing it with generic phrasing about placeholder patterns and template syntax. This prevents a validation script from incorrectly flagging the example as an unreplaced placeholder during prompt audits. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@github/workflows/trigger-prompt-audit.yml`:
- Around line 1-5: The workflow definition named "Trigger Prompt Audit" (file
trigger-prompt-audit.yml) is placed in the wrong directory so GitHub Actions
won't discover it; move this file into the .github/workflows/ directory (i.e.,
.github/workflows/trigger-prompt-audit.yml), commit the move, and verify the
schedule and workflow_dispatch trigger remain unchanged so the workflow is
picked up by GitHub Actions.
| name: Trigger Prompt Audit | ||
| on: | ||
| schedule: | ||
| - cron: "0 11 * * 1" # Mondays at 11:00 UTC | ||
| workflow_dispatch: |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Find the workflow file mentioned in the review
fd -t f "trigger-prompt-audit.yml" .Repository: elastic/ai-github-actions
Length of output: 112
🏁 Script executed:
# Check .github/workflows directory structure
ls -la .github/workflows/ 2>/dev/null | head -20Repository: elastic/ai-github-actions
Length of output: 1501
🌐 Web query:
GitHub Actions workflow file location requirements .github/workflows directory discovery
💡 Result:
GitHub Actions only discovers workflow definitions that are committed to your repository under:
.github/workflows/at the repository root (not inside your app subfolders). GitHub will not run workflow files stored elsewhere. [1]- Workflow files must be YAML with a
.ymlor.yamlextension. [1] - For reusable workflows (
workflow_call), the called workflow must be a single file directly in.github/workflows/—subdirectories under.github/workflows/are not supported. [2]
Discovery is branch-specific: GitHub evaluates the workflow files present in the ref/branch where the event occurs. [1]
Sources: [1] GitHub Docs – Workflow syntax for GitHub Actions, [2] GitHub Docs – Reusing workflow configurations
Move file to .github/workflows/ directory.
File is at github/workflows/trigger-prompt-audit.yml but GitHub Actions only discovers workflows in .github/workflows/ (with the dot prefix). Without relocation, this workflow will not be triggered.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@github/workflows/trigger-prompt-audit.yml` around lines 1 - 5, The workflow
definition named "Trigger Prompt Audit" (file trigger-prompt-audit.yml) is
placed in the wrong directory so GitHub Actions won't discover it; move this
file into the .github/workflows/ directory (i.e.,
.github/workflows/trigger-prompt-audit.yml), commit the move, and verify the
schedule and workflow_dispatch trigger remain unchanged so the workflow is
picked up by GitHub Actions.
…rrect location (#471) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Summary
.github/workflows/trigger-prompt-audit.ymlto remove a literal placeholder-like token (__GH_AW_*__) that can be interpreted as an unreplaced marker.\{\\{\#if ...}}example.Why
Issue #466 reports a prompt-audit failure caused by literal marker text being interpreted as an unreplaced placeholder. This wording change removes the problematic literal while preserving reviewer guidance.
Validation
make lint: passedFixes Prompt audit error #466
What is this? | From workflow: Mention in Issue
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.