From ff038e23220f93a194f35403e26d92aed49c8439 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 00:46:33 +0000 Subject: [PATCH 1/2] Initial plan From 09459211a97f977248e5cb35b269042a84d16454 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 00:53:04 +0000 Subject: [PATCH 2/2] Standardize issue-title-prefix to title-prefix in scheduled-audit and scheduled-fix workflows Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com> --- .../workflows/gh-aw-scheduled-audit.lock.yml | 18 +++++++------- .github/workflows/gh-aw-scheduled-audit.md | 8 +++---- .../workflows/gh-aw-scheduled-fix.lock.yml | 24 +++++++++---------- .github/workflows/gh-aw-scheduled-fix.md | 8 +++---- gh-agent-workflows/scheduled-audit/README.md | 2 +- .../scheduled-audit/example.yml | 2 +- gh-agent-workflows/scheduled-fix/README.md | 2 +- gh-agent-workflows/scheduled-fix/example.yml | 2 +- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/gh-aw-scheduled-audit.lock.yml b/.github/workflows/gh-aw-scheduled-audit.lock.yml index db873f1e..1bc842a7 100644 --- a/.github/workflows/gh-aw-scheduled-audit.lock.yml +++ b/.github/workflows/gh-aw-scheduled-audit.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"2d4e5bf57f7258448758a77aed6fc845c3e2cec37300c7ff4d9cc88d5f09cfc5"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"b61730b9dbb865f232b0e2a66a45495ac14243704bc58f32f754f9ab2d770fde"} name: "Scheduled Audit" "on": @@ -63,10 +63,6 @@ name: "Scheduled Audit" description: Label to apply to created issues (must already exist in the target repo) required: false type: string - issue-title-prefix: - description: Title prefix for created issues, e.g. '[my-audit]' - required: true - type: string messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -82,6 +78,10 @@ name: "Scheduled Audit" description: Shell commands to run before the agent starts (dependency install, build, etc.) required: false type: string + title-prefix: + description: Title prefix for created issues, e.g. '[my-audit]' + required: true + type: string secrets: COPILOT_GITHUB_TOKEN: required: true @@ -90,7 +90,7 @@ permissions: {} concurrency: cancel-in-progress: true - group: scheduled-audit-${{ inputs.issue-title-prefix }} + group: scheduled-audit-${{ inputs.title-prefix }} run-name: "Scheduled Audit" @@ -512,7 +512,7 @@ jobs: shell: bash - env: GH_TOKEN: ${{ github.token }} - TITLE_PREFIX: ${{ inputs.issue-title-prefix }} + TITLE_PREFIX: ${{ inputs.title-prefix }} name: List previous findings run: "set -euo pipefail\ngh issue list \\\n --repo \"$GITHUB_REPOSITORY\" \\\n --search \"in:title \\\"$TITLE_PREFIX\\\"\" \\\n --state all \\\n --limit 100 \\\n --json number,title,state \\\n > /tmp/previous-findings.json || { echo \"::warning::Failed to fetch previous findings — dedup will be skipped\"; echo \"[]\" > /tmp/previous-findings.json; }\n" - env: @@ -622,7 +622,7 @@ jobs: cat > /opt/gh-aw/safeoutputs/tools.json << 'GH_AW_SAFE_OUTPUTS_TOOLS_EOF' [ { - "description": "Create a new GitHub issue for tracking bugs, feature requests, or tasks. Use this for actionable work items that need assignment, labeling, and status tracking. For reports, announcements, or status updates that don't require task tracking, use create_discussion instead. CONSTRAINTS: Maximum 1 issue(s) can be created. Title will be prefixed with \"${{ inputs.issue-title-prefix }} \".", + "description": "Create a new GitHub issue for tracking bugs, feature requests, or tasks. Use this for actionable work items that need assignment, labeling, and status tracking. For reports, announcements, or status updates that don't require task tracking, use create_discussion instead. CONSTRAINTS: Maximum 1 issue(s) can be created. Title will be prefixed with \"${{ inputs.title-prefix }} \".", "inputSchema": { "additionalProperties": false, "properties": { @@ -1384,7 +1384,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":false,\"expires\":168,\"max\":1,\"title_prefix\":\"${{ inputs.issue-title-prefix }} \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":false,\"expires\":168,\"max\":1,\"title_prefix\":\"${{ inputs.title-prefix }} \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-scheduled-audit.md b/.github/workflows/gh-aw-scheduled-audit.md index 0af6f2a7..113dd859 100644 --- a/.github/workflows/gh-aw-scheduled-audit.md +++ b/.github/workflows/gh-aw-scheduled-audit.md @@ -27,7 +27,7 @@ on: description: "What the audit agent should investigate — appended as the Report Assignment" type: string required: true - issue-title-prefix: + title-prefix: description: "Title prefix for created issues, e.g. '[my-audit]'" type: string required: true @@ -58,7 +58,7 @@ on: bots: - "${{ inputs.allowed-bot-users }}" concurrency: - group: scheduled-audit-${{ inputs.issue-title-prefix }} + group: scheduled-audit-${{ inputs.title-prefix }} cancel-in-progress: true permissions: actions: read @@ -76,7 +76,7 @@ safe-outputs: noop: create-issue: max: 1 - title-prefix: "${{ inputs.issue-title-prefix }} " + title-prefix: "${{ inputs.title-prefix }} " close-older-issues: false expires: 7d timeout-minutes: 90 @@ -84,7 +84,7 @@ steps: - name: List previous findings env: GH_TOKEN: ${{ github.token }} - TITLE_PREFIX: ${{ inputs.issue-title-prefix }} + TITLE_PREFIX: ${{ inputs.title-prefix }} run: | set -euo pipefail gh issue list \ diff --git a/.github/workflows/gh-aw-scheduled-fix.lock.yml b/.github/workflows/gh-aw-scheduled-fix.lock.yml index a31825c8..2db0d269 100644 --- a/.github/workflows/gh-aw-scheduled-fix.lock.yml +++ b/.github/workflows/gh-aw-scheduled-fix.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"154f672a99f85027c1616145f6e00a6ac8b448146e7d7643a063867bd8ee7604"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"fb9cb61d1c7bc9a1ef3adc355056c47c15620699f4ae199addc698133f2b0298"} name: "Scheduled Fix" "on": @@ -68,10 +68,6 @@ name: "Scheduled Fix" description: Label to search for in open issues required: false type: string - issue-title-prefix: - description: Title prefix to search for in open issues, e.g. '[text-auditor]' - required: true - type: string messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -87,6 +83,10 @@ name: "Scheduled Fix" description: Shell commands to run before the agent starts (dependency install, build, etc.) required: false type: string + title-prefix: + description: Title prefix to search for in open issues, e.g. '[text-auditor]' + required: true + type: string secrets: COPILOT_GITHUB_TOKEN: required: true @@ -95,7 +95,7 @@ permissions: {} concurrency: cancel-in-progress: true - group: scheduled-fix-${{ inputs.issue-title-prefix }} + group: scheduled-fix-${{ inputs.title-prefix }} run-name: "Scheduled Fix" @@ -146,7 +146,7 @@ jobs: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} GH_AW_EXPR_49B959F1: ${{ inputs.additional-instructions }} GH_AW_EXPR_955E52F5: ${{ inputs.issue-label }} - GH_AW_EXPR_CE96317F: ${{ inputs.issue-title-prefix }} + GH_AW_EXPR_BF503D80: ${{ inputs.title-prefix }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} @@ -367,7 +367,7 @@ jobs: Search for open issues matching the configured title prefix: ````text - github-search_issues: query="repo:{owner}/{repo} is:issue is:open in:title \"__GH_AW_EXPR_CE96317F__\" sort:updated-asc" + github-search_issues: query="repo:{owner}/{repo} is:issue is:open in:title \"__GH_AW_EXPR_BF503D80__\" sort:updated-asc" ```` If `__GH_AW_EXPR_955E52F5__` is not empty, also search by label: @@ -388,7 +388,7 @@ jobs: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_EXPR_49B959F1: ${{ inputs.additional-instructions }} GH_AW_EXPR_955E52F5: ${{ inputs.issue-label }} - GH_AW_EXPR_CE96317F: ${{ inputs.issue-title-prefix }} + GH_AW_EXPR_BF503D80: ${{ inputs.title-prefix }} with: script: | const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); @@ -401,7 +401,7 @@ jobs: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt GH_AW_EXPR_49B959F1: ${{ inputs.additional-instructions }} GH_AW_EXPR_955E52F5: ${{ inputs.issue-label }} - GH_AW_EXPR_CE96317F: ${{ inputs.issue-title-prefix }} + GH_AW_EXPR_BF503D80: ${{ inputs.title-prefix }} GH_AW_GITHUB_ACTOR: ${{ github.actor }} GH_AW_GITHUB_EVENT_COMMENT_ID: ${{ github.event.comment.id }} GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: ${{ github.event.discussion.number }} @@ -424,7 +424,7 @@ jobs: substitutions: { GH_AW_EXPR_49B959F1: process.env.GH_AW_EXPR_49B959F1, GH_AW_EXPR_955E52F5: process.env.GH_AW_EXPR_955E52F5, - GH_AW_EXPR_CE96317F: process.env.GH_AW_EXPR_CE96317F, + GH_AW_EXPR_BF503D80: process.env.GH_AW_EXPR_BF503D80, GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR, GH_AW_GITHUB_EVENT_COMMENT_ID: process.env.GH_AW_GITHUB_EVENT_COMMENT_ID, GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER: process.env.GH_AW_GITHUB_EVENT_DISCUSSION_NUMBER, @@ -536,7 +536,7 @@ jobs: shell: bash - env: GH_TOKEN: ${{ github.token }} - TITLE_PREFIX: ${{ inputs.issue-title-prefix }} + TITLE_PREFIX: ${{ inputs.title-prefix }} name: List previous findings run: "set -euo pipefail\ngh issue list \\\n --repo \"$GITHUB_REPOSITORY\" \\\n --search \"in:title \\\"$TITLE_PREFIX\\\"\" \\\n --state all \\\n --limit 100 \\\n --json number,title,state \\\n > /tmp/previous-findings.json || { echo \"::warning::Failed to fetch previous findings — dedup will be skipped\"; echo \"[]\" > /tmp/previous-findings.json; }\n" - env: diff --git a/.github/workflows/gh-aw-scheduled-fix.md b/.github/workflows/gh-aw-scheduled-fix.md index 1be97ba6..49f5a15b 100644 --- a/.github/workflows/gh-aw-scheduled-fix.md +++ b/.github/workflows/gh-aw-scheduled-fix.md @@ -27,7 +27,7 @@ on: description: "Domain-specific fix instructions — appended as the Fix Assignment" type: string required: true - issue-title-prefix: + title-prefix: description: "Title prefix to search for in open issues, e.g. '[text-auditor]'" type: string required: true @@ -63,7 +63,7 @@ on: bots: - "${{ inputs.allowed-bot-users }}" concurrency: - group: scheduled-fix-${{ inputs.issue-title-prefix }} + group: scheduled-fix-${{ inputs.title-prefix }} cancel-in-progress: true permissions: actions: read @@ -84,7 +84,7 @@ steps: - name: List previous findings env: GH_TOKEN: ${{ github.token }} - TITLE_PREFIX: ${{ inputs.issue-title-prefix }} + TITLE_PREFIX: ${{ inputs.title-prefix }} run: | set -euo pipefail gh issue list \ @@ -114,7 +114,7 @@ Before filing a new issue, check `/tmp/previous-findings.json` for issues this a Search for open issues matching the configured title prefix: ````text -github-search_issues: query="repo:{owner}/{repo} is:issue is:open in:title \"${{ inputs.issue-title-prefix }}\" sort:updated-asc" +github-search_issues: query="repo:{owner}/{repo} is:issue is:open in:title \"${{ inputs.title-prefix }}\" sort:updated-asc" ```` If `${{ inputs.issue-label }}` is not empty, also search by label: diff --git a/gh-agent-workflows/scheduled-audit/README.md b/gh-agent-workflows/scheduled-audit/README.md index c08623f8..f9beb180 100644 --- a/gh-agent-workflows/scheduled-audit/README.md +++ b/gh-agent-workflows/scheduled-audit/README.md @@ -34,7 +34,7 @@ See [example.yml](example.yml) for the full workflow file. You **must** customiz | Input | Description | Required | Default | | --- | --- | --- | --- | | `additional-instructions` | What the audit agent should investigate (the Report Assignment) | **Yes** | — | -| `issue-title-prefix` | Title prefix for created issues, e.g. `[my-audit]` | **Yes** | — | +| `title-prefix` | Title prefix for created issues, e.g. `[my-audit]` | **Yes** | — | | `issue-label` | Label to apply to created issues | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | diff --git a/gh-agent-workflows/scheduled-audit/example.yml b/gh-agent-workflows/scheduled-audit/example.yml index 6035a96c..486035ca 100644 --- a/gh-agent-workflows/scheduled-audit/example.yml +++ b/gh-agent-workflows/scheduled-audit/example.yml @@ -14,7 +14,7 @@ jobs: run: uses: elastic/ai-github-actions/.github/workflows/gh-aw-scheduled-audit.lock.yml@v0 with: - issue-title-prefix: "[my-audit]" + title-prefix: "[my-audit]" issue-label: "my-audit" additional-instructions: | Describe what the audit agent should investigate here. diff --git a/gh-agent-workflows/scheduled-fix/README.md b/gh-agent-workflows/scheduled-fix/README.md index 96bd5399..65c37395 100644 --- a/gh-agent-workflows/scheduled-fix/README.md +++ b/gh-agent-workflows/scheduled-fix/README.md @@ -33,7 +33,7 @@ See [example.yml](example.yml) for the full workflow file. You **must** customiz | Input | Description | Required | Default | | --- | --- | --- | --- | | `additional-instructions` | Domain-specific fix instructions (the Fix Assignment) | **Yes** | — | -| `issue-title-prefix` | Title prefix to search for in open issues, e.g. `[my-audit]` | **Yes** | — | +| `title-prefix` | Title prefix to search for in open issues, e.g. `[my-audit]` | **Yes** | — | | `issue-label` | Label to search for in open issues | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | diff --git a/gh-agent-workflows/scheduled-fix/example.yml b/gh-agent-workflows/scheduled-fix/example.yml index 8b443d98..90a811aa 100644 --- a/gh-agent-workflows/scheduled-fix/example.yml +++ b/gh-agent-workflows/scheduled-fix/example.yml @@ -14,7 +14,7 @@ jobs: run: uses: elastic/ai-github-actions/.github/workflows/gh-aw-scheduled-fix.lock.yml@v0 with: - issue-title-prefix: "[my-audit]" + title-prefix: "[my-audit]" issue-label: "my-audit" additional-instructions: | Describe domain-specific fix instructions here.