Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .github/workflows/gh-aw-agent-suggestions.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .github/workflows/gh-aw-agent-suggestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ imports:
- gh-aw-fragments/mcp-pagination.md
- gh-aw-fragments/messages-footer.md
- gh-aw-fragments/safe-output-create-issue.md
- gh-aw-fragments/previous-findings.md
- gh-aw-fragments/scheduled-audit.md
- gh-aw-fragments/network-ecosystems.md
engine:
Expand Down Expand Up @@ -43,6 +44,11 @@ on:
type: string
required: false
default: ""
title-prefix:
description: "Title prefix for created issues (e.g. '[agent-suggestions]')"
type: string
required: false
default: "[agent-suggestions]"
secrets:
COPILOT_GITHUB_TOKEN:
required: true
Expand All @@ -67,7 +73,7 @@ safe-outputs:
noop:
create-issue:
max: 1
title-prefix: "[agent-suggestions] "
title-prefix: "${{ inputs.title-prefix }} "
close-older-issues: false
expires: 7d
timeout-minutes: 90
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/gh-aw-branch-actions-detective.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion .github/workflows/gh-aw-branch-actions-detective.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ imports:
- gh-aw-fragments/mcp-pagination.md
- gh-aw-fragments/messages-footer.md
- gh-aw-fragments/safe-output-create-issue.md
- gh-aw-fragments/previous-findings.md
- gh-aw-fragments/network-ecosystems.md
engine:
id: copilot
Expand Down Expand Up @@ -41,6 +42,11 @@ on:
type: string
required: false
default: ""
title-prefix:
description: "Title prefix for created issues (e.g. '[branch-actions-detective]')"
type: string
required: false
default: "[branch-actions-detective]"
Comment on lines +45 to +49

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Configurable prefix is not propagated to duplicate-check instructions.

You made title-prefix configurable, but the prompt still tells the agent to search for hardcoded [branch-actions-detective] issues. If callers override the prefix, dedup checks in the prompt can miss existing findings.

Suggested fix
-3. Check for existing open issues with the `[branch-actions-detective]` title prefix to avoid duplicates:
+3. Check for existing open issues with the `${{ inputs.title-prefix }}` title prefix to avoid duplicates:
    ````bash
    gh api 'repos/{owner}/{repo}/issues?state=open&per_page=10' \
-     --jq '.[] | select(.title | startswith("[branch-actions-detective]")) | {number: .number, title: .title, html_url: .html_url}'
+     --jq '.[] | select(.title | startswith("${{ inputs.title-prefix }}")) | {number: .number, title: .title, html_url: .html_url}'
    ````
...
-**If an existing open `[branch-actions-detective]` issue tracks the same root cause:**
+**If an existing open `${{ inputs.title-prefix }}` issue tracks the same root cause:**

Also applies to: 74-74

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gh-aw-branch-actions-detective.md around lines 45 - 49,
Replace the hardcoded "[branch-actions-detective]" literal with the configurable
input variable for the title prefix everywhere it’s used: use ${{
inputs.title-prefix }} in the GH API jq filter (change select(.title |
startswith("[branch-actions-detective]")) to select(.title | startswith("${{
inputs.title-prefix }}"))) and update any prompt/markdown strings (e.g., the
sentence beginning "If an existing open ...") to reference ${{
inputs.title-prefix }} instead of the fixed bracketed string; ensure all
occurrences (including the other instance noted) are updated so dedup checks
honor the configured title-prefix input.

secrets:
COPILOT_GITHUB_TOKEN:
required: true
Expand All @@ -65,7 +71,7 @@ safe-outputs:
noop:
create-issue:
max: 1
title-prefix: "[branch-actions-detective] "
title-prefix: "${{ inputs.title-prefix }} "
close-older-issues: true
expires: 7d
timeout-minutes: 60
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/gh-aw-breaking-change-detect.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading