diff --git a/.github/workflows/agentics-maintenance.yml b/.github/workflows/agentics-maintenance.yml index 89d2058c..928d335d 100644 --- a/.github/workflows/agentics-maintenance.yml +++ b/.github/workflows/agentics-maintenance.yml @@ -31,7 +31,7 @@ # in create-discussions, create-issues, or create-pull-request safe-outputs configuration. # Schedule frequency is automatically determined by the shortest expiration time. # -name: "Internal: Agentic Maintenance" +name: Agentic Maintenance on: schedule: diff --git a/.github/workflows/gh-aw-agent-suggestions.lock.yml b/.github/workflows/gh-aw-agent-suggestions.lock.yml index 3f266419..3c37a9be 100644 --- a/.github/workflows/gh-aw-agent-suggestions.lock.yml +++ b/.github/workflows/gh-aw-agent-suggestions.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"05a8222ed64c0e2d7bdadf1a38c9d5810bdc5c3cc558ddb2c333f8650ee7c6a4"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"a2998a73accf71b0882f63e28455518f5361b8d8b160eadb50bd57dfe6f66955"} name: "Agent Suggestions" "on": @@ -58,6 +58,11 @@ name: "Agent Suggestions" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -93,8 +98,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -126,6 +134,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -523,8 +540,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1289,8 +1304,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1450,7 +1463,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[agent-suggestions] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[agent-suggestions] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-agent-suggestions.md b/.github/workflows/gh-aw-agent-suggestions.md index 97e8ed66..6c0bd5ac 100644 --- a/.github/workflows/gh-aw-agent-suggestions.md +++ b/.github/workflows/gh-aw-agent-suggestions.md @@ -42,6 +42,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-breaking-change-detect.lock.yml b/.github/workflows/gh-aw-breaking-change-detect.lock.yml index b0f5b47c..a0773811 100644 --- a/.github/workflows/gh-aw-breaking-change-detect.lock.yml +++ b/.github/workflows/gh-aw-breaking-change-detect.lock.yml @@ -42,7 +42,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"d6a0d77b690516b43b333659ea2bfb1aa15b8dcbf15bc347bb42306cd38ea922"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"f917ceaf3705a541c5c54819a3aab670b6c3c21085dc1c64cf6f05fd532f8c7a"} name: "Breaking Change Detector" "on": @@ -64,6 +64,11 @@ name: "Breaking Change Detector" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -99,8 +104,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -132,6 +140,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -535,8 +552,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1307,8 +1322,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1468,7 +1481,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[breaking-change] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[breaking-change] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-breaking-change-detector.lock.yml b/.github/workflows/gh-aw-breaking-change-detector.lock.yml index f47347b5..d906572f 100644 --- a/.github/workflows/gh-aw-breaking-change-detector.lock.yml +++ b/.github/workflows/gh-aw-breaking-change-detector.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"d6a0d77b690516b43b333659ea2bfb1aa15b8dcbf15bc347bb42306cd38ea922"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"f917ceaf3705a541c5c54819a3aab670b6c3c21085dc1c64cf6f05fd532f8c7a"} name: "Breaking Change Detector" "on": @@ -59,6 +59,11 @@ name: "Breaking Change Detector" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -94,8 +99,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -127,6 +135,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -530,8 +547,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1302,8 +1317,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1463,7 +1476,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[breaking-change] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[breaking-change] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-breaking-change-detector.md b/.github/workflows/gh-aw-breaking-change-detector.md index 2b4b838b..372df77d 100644 --- a/.github/workflows/gh-aw-breaking-change-detector.md +++ b/.github/workflows/gh-aw-breaking-change-detector.md @@ -43,6 +43,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-bug-hunter.lock.yml b/.github/workflows/gh-aw-bug-hunter.lock.yml index 7cda3724..bfe7c355 100644 --- a/.github/workflows/gh-aw-bug-hunter.lock.yml +++ b/.github/workflows/gh-aw-bug-hunter.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"760d2c65f08ce2e248d5f20032748d9db3aab3a37b206d946ab1d8f24e5601f3"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"6249e90577c4ed5a6fac63f2d0d2dcd2eb5644e30d82980a46c52ec846614e29"} name: "Bug Hunter" "on": @@ -59,6 +59,11 @@ name: "Bug Hunter" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -94,8 +99,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -127,6 +135,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -528,8 +545,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1300,8 +1315,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1461,7 +1474,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[bug-hunter] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[bug-hunter] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-bug-hunter.md b/.github/workflows/gh-aw-bug-hunter.md index d7f967e6..cfae2091 100644 --- a/.github/workflows/gh-aw-bug-hunter.md +++ b/.github/workflows/gh-aw-bug-hunter.md @@ -43,6 +43,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-code-duplication-detector.lock.yml b/.github/workflows/gh-aw-code-duplication-detector.lock.yml index e09c041e..be824e09 100644 --- a/.github/workflows/gh-aw-code-duplication-detector.lock.yml +++ b/.github/workflows/gh-aw-code-duplication-detector.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"f668db4d950c191b06eba7c0a26de623d69b3d9d098a23d257f97fc237126a8d"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"e43614be65231477399c07d7d3542a11e0ebe922873611a5f5f49c965e958080"} name: "Code Duplication Detector" "on": @@ -58,6 +58,11 @@ name: "Code Duplication Detector" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean file-globs: default: "" description: Comma-separated file globs to analyze (overrides languages mapping) @@ -103,8 +108,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -136,6 +144,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -571,8 +588,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1345,8 +1360,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1506,7 +1519,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[refactor] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[refactor] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-code-duplication-detector.md b/.github/workflows/gh-aw-code-duplication-detector.md index ae10d38b..6d2f77db 100644 --- a/.github/workflows/gh-aw-code-duplication-detector.md +++ b/.github/workflows/gh-aw-code-duplication-detector.md @@ -52,6 +52,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-docs-drift.lock.yml b/.github/workflows/gh-aw-docs-drift.lock.yml index 2c6753e4..aed7a0b3 100644 --- a/.github/workflows/gh-aw-docs-drift.lock.yml +++ b/.github/workflows/gh-aw-docs-drift.lock.yml @@ -42,7 +42,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"534d44254a3ea17148b2a627e57c179de00dbfe286876c0175888f81f9dcecd7"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"58bf71dee63f992762ccdb83a63cab244c5957b274ffa83cd70249faa6d70a0e"} name: "Docs Patrol" "on": @@ -64,6 +64,11 @@ name: "Docs Patrol" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean lookback-window: default: 7 days ago description: Git lookback window for detecting recent commits (e.g. '7 days ago', '14 days ago') @@ -104,8 +109,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -137,6 +145,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -541,8 +558,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1313,8 +1328,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1474,7 +1487,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[docs-patrol] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[docs-patrol] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-docs-patrol-external.lock.yml b/.github/workflows/gh-aw-docs-patrol-external.lock.yml index 03fe9e21..5f101882 100644 --- a/.github/workflows/gh-aw-docs-patrol-external.lock.yml +++ b/.github/workflows/gh-aw-docs-patrol-external.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"524d010a9afdffa2c7634092afdd9b76b933b1ee3b52d83a4ac6db581758b009"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"d50ff16e1f2b490de18d5566605bd1d993aead3e65c36927c8c5b724c2bc78fa"} name: "Docs Patrol External" "on": @@ -59,6 +59,11 @@ name: "Docs Patrol External" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean lookback-window: default: 7 days ago description: Git lookback window for detecting recent commits (e.g. '7 days ago', '14 days ago') @@ -99,8 +104,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -132,6 +140,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -561,8 +578,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1343,8 +1358,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1504,7 +1517,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[docs-patrol-external] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[docs-patrol-external] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-docs-patrol-external.md b/.github/workflows/gh-aw-docs-patrol-external.md index 6c0132d9..172a8e69 100644 --- a/.github/workflows/gh-aw-docs-patrol-external.md +++ b/.github/workflows/gh-aw-docs-patrol-external.md @@ -48,6 +48,11 @@ on: type: string required: false default: "7 days ago" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-docs-patrol.lock.yml b/.github/workflows/gh-aw-docs-patrol.lock.yml index c084bcd3..54f511a2 100644 --- a/.github/workflows/gh-aw-docs-patrol.lock.yml +++ b/.github/workflows/gh-aw-docs-patrol.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"534d44254a3ea17148b2a627e57c179de00dbfe286876c0175888f81f9dcecd7"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"58bf71dee63f992762ccdb83a63cab244c5957b274ffa83cd70249faa6d70a0e"} name: "Docs Patrol" "on": @@ -59,6 +59,11 @@ name: "Docs Patrol" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean lookback-window: default: 7 days ago description: Git lookback window for detecting recent commits (e.g. '7 days ago', '14 days ago') @@ -99,8 +104,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -132,6 +140,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -536,8 +553,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1308,8 +1323,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1469,7 +1482,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[docs-patrol] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[docs-patrol] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-docs-patrol.md b/.github/workflows/gh-aw-docs-patrol.md index 3e88f87e..4d42e1a7 100644 --- a/.github/workflows/gh-aw-docs-patrol.md +++ b/.github/workflows/gh-aw-docs-patrol.md @@ -48,6 +48,11 @@ on: type: string required: false default: "7 days ago" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-downstream-health.lock.yml b/.github/workflows/gh-aw-downstream-health.lock.yml index b48473e8..fa8b2af2 100644 --- a/.github/workflows/gh-aw-downstream-health.lock.yml +++ b/.github/workflows/gh-aw-downstream-health.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"690adae32c44740e440da80b9ba4ea9260c21892661324cc6478f3bb1545ab79"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"bf2187b2cf20dea140352f6516238beac420f2b257d0770541af678a553eb659"} name: "Downstream Health" "on": @@ -58,6 +58,11 @@ name: "Downstream Health" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -93,8 +98,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -126,6 +134,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -569,8 +586,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1335,8 +1350,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1496,7 +1509,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[downstream-health] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[downstream-health] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-downstream-health.md b/.github/workflows/gh-aw-downstream-health.md index 7069c029..76e0d23d 100644 --- a/.github/workflows/gh-aw-downstream-health.md +++ b/.github/workflows/gh-aw-downstream-health.md @@ -42,6 +42,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-flaky-test-investigator.lock.yml b/.github/workflows/gh-aw-flaky-test-investigator.lock.yml index d1979f6a..4d79c07a 100644 --- a/.github/workflows/gh-aw-flaky-test-investigator.lock.yml +++ b/.github/workflows/gh-aw-flaky-test-investigator.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"c57800689f45c5797e4b8d101c9679d53ff1ac7492df7d02953e959811459a7f"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"6f66d65c63273e1d92945d948e32f0e87e9120c375617f585dafb90f1a9b8a97"} name: "Flaky Test Investigator" "on": @@ -59,6 +59,11 @@ name: "Flaky Test Investigator" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -94,8 +99,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -127,6 +135,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -529,8 +546,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1295,8 +1310,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1456,7 +1469,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[flaky-test-investigator] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[flaky-test-investigator] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-flaky-test-investigator.md b/.github/workflows/gh-aw-flaky-test-investigator.md index b45000e5..d6c7a661 100644 --- a/.github/workflows/gh-aw-flaky-test-investigator.md +++ b/.github/workflows/gh-aw-flaky-test-investigator.md @@ -43,6 +43,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-newbie-contributor-patrol-external.lock.yml b/.github/workflows/gh-aw-newbie-contributor-patrol-external.lock.yml index 75108553..a57ac76d 100644 --- a/.github/workflows/gh-aw-newbie-contributor-patrol-external.lock.yml +++ b/.github/workflows/gh-aw-newbie-contributor-patrol-external.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"fc58e605bfa7ecfb4131d8ac36c2476337519dab3c704d204dc3c54d3f106d49"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"b7cb5bab30bc679951472b339b186049ef197ffbc658a808fe97bda14cdf5563"} name: "Newbie Contributor Patrol External" "on": @@ -58,6 +58,11 @@ name: "Newbie Contributor Patrol External" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -93,8 +98,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -126,6 +134,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -510,8 +527,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1285,8 +1300,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1446,7 +1459,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[newbie-contributor-external] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[newbie-contributor-external] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-newbie-contributor-patrol-external.md b/.github/workflows/gh-aw-newbie-contributor-patrol-external.md index 9a44e53e..c51804f4 100644 --- a/.github/workflows/gh-aw-newbie-contributor-patrol-external.md +++ b/.github/workflows/gh-aw-newbie-contributor-patrol-external.md @@ -42,6 +42,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-newbie-contributor-patrol.lock.yml b/.github/workflows/gh-aw-newbie-contributor-patrol.lock.yml index 5b3bb870..49d38087 100644 --- a/.github/workflows/gh-aw-newbie-contributor-patrol.lock.yml +++ b/.github/workflows/gh-aw-newbie-contributor-patrol.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"b5789f7e38c9157dccdb578449c69b70c958977e5124dd5e5c50592d5145d912"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"3ea261e80e82fcd9e0acdf5a97e18d67a3d8844a9b364126747b998564de6249"} name: "Newbie Contributor Patrol" "on": @@ -58,6 +58,11 @@ name: "Newbie Contributor Patrol" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -93,8 +98,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -126,6 +134,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -502,8 +519,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1268,8 +1283,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1429,7 +1442,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[newbie-contributor] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[newbie-contributor] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-newbie-contributor-patrol.md b/.github/workflows/gh-aw-newbie-contributor-patrol.md index 0f025106..bc9d306c 100644 --- a/.github/workflows/gh-aw-newbie-contributor-patrol.md +++ b/.github/workflows/gh-aw-newbie-contributor-patrol.md @@ -42,6 +42,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-performance-profiler.lock.yml b/.github/workflows/gh-aw-performance-profiler.lock.yml index 047194dc..bf69fc52 100644 --- a/.github/workflows/gh-aw-performance-profiler.lock.yml +++ b/.github/workflows/gh-aw-performance-profiler.lock.yml @@ -38,7 +38,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"c33667a31d297bd575adf8ea5180d7837df6e48e24d4ac5999bf97048ae8f6d5"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"3d1ccc168450e491c9cc4bb76876f91f519f6d325a9e4966dcc182320ad726c3"} name: "Performance Profiler" "on": @@ -60,6 +60,11 @@ name: "Performance Profiler" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -95,8 +100,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -128,6 +136,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -580,8 +597,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1352,8 +1367,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1513,7 +1526,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[performance-profiler] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[performance-profiler] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-performance-profiler.md b/.github/workflows/gh-aw-performance-profiler.md index 0c03e481..967fb501 100644 --- a/.github/workflows/gh-aw-performance-profiler.md +++ b/.github/workflows/gh-aw-performance-profiler.md @@ -44,6 +44,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-project-summary.lock.yml b/.github/workflows/gh-aw-project-summary.lock.yml index 3291954f..c6e545f5 100644 --- a/.github/workflows/gh-aw-project-summary.lock.yml +++ b/.github/workflows/gh-aw-project-summary.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"1887b29fb6b85d26f97ce732baabc822303689e15fd3242b5989d8db3720040b"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"d54655284fd5f3894d39ecc775dca15e47095312417e287bbe7f7374453cbe9d"} name: "Project Summary" "on": @@ -59,6 +59,11 @@ name: "Project Summary" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -94,8 +99,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -127,6 +135,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -518,8 +535,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1290,8 +1305,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1451,7 +1464,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[project-summary] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[project-summary] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-project-summary.md b/.github/workflows/gh-aw-project-summary.md index 689f99d7..254bd359 100644 --- a/.github/workflows/gh-aw-project-summary.md +++ b/.github/workflows/gh-aw-project-summary.md @@ -43,6 +43,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-scheduled-audit.lock.yml b/.github/workflows/gh-aw-scheduled-audit.lock.yml index a71a2a3a..00421a1a 100644 --- a/.github/workflows/gh-aw-scheduled-audit.lock.yml +++ b/.github/workflows/gh-aw-scheduled-audit.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"5407be51afed9319bcbdd8da718762d79b3ddb6c28bc2ed7edf261cd01714d58"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"e078499e0ccd40d078e6b253300e8506458e7458c09fec372b1377bfff7779ab"} name: "Scheduled Audit" "on": @@ -57,6 +57,11 @@ name: "Scheduled Audit" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean issue-label: default: "" description: Label to apply to created issues (must already exist in the target repo) @@ -101,8 +106,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -134,6 +142,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -1394,7 +1411,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\":true,\"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\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"${{ inputs.issue-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 e17b2eb1..736378d6 100644 --- a/.github/workflows/gh-aw-scheduled-audit.md +++ b/.github/workflows/gh-aw-scheduled-audit.md @@ -50,6 +50,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-stale-issues.lock.yml b/.github/workflows/gh-aw-stale-issues.lock.yml index 854eafbf..e67ee5a7 100644 --- a/.github/workflows/gh-aw-stale-issues.lock.yml +++ b/.github/workflows/gh-aw-stale-issues.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"cb0ac749cfef989a2813f1b15b3a6104ecb4a68760a9f56c33c811bc0c48f61a"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"c15416ec88689d567c8ca691bbccc6dfccbda68b05d99b33df5f5f67feb330bd"} name: "Stale Issues" "on": @@ -58,6 +58,11 @@ name: "Stale Issues" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean messages-footer: default: "" description: Footer appended to all agent comments and reviews @@ -93,8 +98,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -126,6 +134,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -553,8 +570,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1319,8 +1334,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1480,7 +1493,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[stale-issues] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[stale-issues] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-stale-issues.md b/.github/workflows/gh-aw-stale-issues.md index 8e1dc1d7..470970e7 100644 --- a/.github/workflows/gh-aw-stale-issues.md +++ b/.github/workflows/gh-aw-stale-issues.md @@ -42,6 +42,11 @@ on: type: string required: false default: "" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/.github/workflows/gh-aw-text-auditor.lock.yml b/.github/workflows/gh-aw-text-auditor.lock.yml index d93620c5..f2c69e90 100644 --- a/.github/workflows/gh-aw-text-auditor.lock.yml +++ b/.github/workflows/gh-aw-text-auditor.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"6d6a022a2976cda11259a6b1e39386d5aa9c7fb5cf5a74b1189ffbd6925d297b"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"b95b928850aba19104773b6bd676b47e040e674391ed3abd289cfe2b67aa8aad"} name: "Text Auditor" "on": @@ -58,6 +58,11 @@ name: "Text Auditor" description: Allowlisted bot actor usernames (comma-separated) required: false type: string + close-older-issues: + default: true + description: Whether to close older issues with the same title prefix when a new one is created + required: false + type: boolean edit-clarity: default: low description: How aggressively to flag unclear user-facing text, especially error/help messages. 'high' = proactively suggest clearer phrasing, 'low' = flag only clearly ambiguous text, 'none' = skip clarity checks @@ -118,8 +123,11 @@ jobs: permissions: contents: read outputs: + body: ${{ steps.sanitized.outputs.body }} comment_id: "" comment_repo: "" + text: ${{ steps.sanitized.outputs.text }} + title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts uses: github/gh-aw/actions/setup@26b6572ae210580303087bc3142fe58d140bf65c # v0.48.1 @@ -151,6 +159,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/check_workflow_timestamp_api.cjs'); await main(); + - name: Compute current body text + id: sanitized + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('/opt/gh-aw/actions/compute_text.cjs'); + await main(); - name: Create prompt with built-in context env: GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt @@ -611,8 +628,6 @@ jobs: contents: read issues: read pull-requests: read - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" env: DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} GH_AW_ASSETS_ALLOWED_EXTS: "" @@ -1377,8 +1392,6 @@ jobs: if: needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true' runs-on: ubuntu-latest permissions: {} - concurrency: - group: "gh-aw-copilot-${{ github.workflow }}" timeout-minutes: 10 outputs: success: ${{ steps.parse_results.outputs.success }} @@ -1538,7 +1551,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\":true,\"expires\":168,\"max\":1,\"title_prefix\":\"[text-auditor] \"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":${{ inputs.close-older-issues }},\"expires\":168,\"max\":1,\"title_prefix\":\"[text-auditor] \"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/gh-aw-text-auditor.md b/.github/workflows/gh-aw-text-auditor.md index 057167b9..f96ff64a 100644 --- a/.github/workflows/gh-aw-text-auditor.md +++ b/.github/workflows/gh-aw-text-auditor.md @@ -67,6 +67,11 @@ on: type: string required: false default: "low" + close-older-issues: + description: "Whether to close older issues with the same title prefix when a new one is created" + type: boolean + required: false + default: true secrets: COPILOT_GITHUB_TOKEN: required: true diff --git a/Makefile b/Makefile index ae43d87d..0d418fe4 100644 --- a/Makefile +++ b/Makefile @@ -131,6 +131,7 @@ compile: setup-gh-aw sync @echo "Compiling agentic workflows..." @.bin/gh-aw compile --action-mode release --action-tag $(GH_AW_VERSION) @./scripts/backwards-compat.sh + @./scripts/inject-configurable-close.sh setup-actionlint: @echo "Setting up actionlint..." diff --git a/gh-agent-workflows/agent-suggestions/README.md b/gh-agent-workflows/agent-suggestions/README.md index e05dae84..18e2fcf2 100644 --- a/gh-agent-workflows/agent-suggestions/README.md +++ b/gh-agent-workflows/agent-suggestions/README.md @@ -28,6 +28,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/breaking-change-detector/README.md b/gh-agent-workflows/breaking-change-detector/README.md index b6315fbb..37520cf4 100644 --- a/gh-agent-workflows/breaking-change-detector/README.md +++ b/gh-agent-workflows/breaking-change-detector/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/bug-hunter/README.md b/gh-agent-workflows/bug-hunter/README.md index b53c3ac3..9c939815 100644 --- a/gh-agent-workflows/bug-hunter/README.md +++ b/gh-agent-workflows/bug-hunter/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/code-duplication-detector/README.md b/gh-agent-workflows/code-duplication-detector/README.md index d3ec3293..6471c41c 100644 --- a/gh-agent-workflows/code-duplication-detector/README.md +++ b/gh-agent-workflows/code-duplication-detector/README.md @@ -32,6 +32,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/docs-patrol-external/README.md b/gh-agent-workflows/docs-patrol-external/README.md index bb262cf0..90128c39 100644 --- a/gh-agent-workflows/docs-patrol-external/README.md +++ b/gh-agent-workflows/docs-patrol-external/README.md @@ -31,6 +31,7 @@ See [example.yml](example.yml) for the full workflow file. | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `lookback-window` | Git lookback window for detecting recent commits (e.g. `7 days ago`, `14 days ago`) | No | `"7 days ago"` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/docs-patrol/README.md b/gh-agent-workflows/docs-patrol/README.md index 9f759b90..920c796a 100644 --- a/gh-agent-workflows/docs-patrol/README.md +++ b/gh-agent-workflows/docs-patrol/README.md @@ -31,6 +31,7 @@ See [example.yml](example.yml) for the full workflow file. | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `lookback-window` | Git lookback window for detecting recent commits (e.g. `7 days ago`, `14 days ago`) | No | `"7 days ago"` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/downstream-health/README.md b/gh-agent-workflows/downstream-health/README.md index f544c141..c200d4db 100644 --- a/gh-agent-workflows/downstream-health/README.md +++ b/gh-agent-workflows/downstream-health/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/flaky-test-investigator/README.md b/gh-agent-workflows/flaky-test-investigator/README.md index 2212fb73..f6832c04 100644 --- a/gh-agent-workflows/flaky-test-investigator/README.md +++ b/gh-agent-workflows/flaky-test-investigator/README.md @@ -31,6 +31,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/newbie-contributor-patrol-external/README.md b/gh-agent-workflows/newbie-contributor-patrol-external/README.md index f5217ca7..76294704 100644 --- a/gh-agent-workflows/newbie-contributor-patrol-external/README.md +++ b/gh-agent-workflows/newbie-contributor-patrol-external/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/newbie-contributor-patrol/README.md b/gh-agent-workflows/newbie-contributor-patrol/README.md index fe68c004..122bc716 100644 --- a/gh-agent-workflows/newbie-contributor-patrol/README.md +++ b/gh-agent-workflows/newbie-contributor-patrol/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/performance-profiler/README.md b/gh-agent-workflows/performance-profiler/README.md index ec32b93d..7ca80847 100644 --- a/gh-agent-workflows/performance-profiler/README.md +++ b/gh-agent-workflows/performance-profiler/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/project-summary/README.md b/gh-agent-workflows/project-summary/README.md index f7467802..2ad516c1 100644 --- a/gh-agent-workflows/project-summary/README.md +++ b/gh-agent-workflows/project-summary/README.md @@ -30,6 +30,7 @@ See [example.yml](example.yml) for the full workflow file. | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Storyteller / chronicler example diff --git a/gh-agent-workflows/scheduled-audit/README.md b/gh-agent-workflows/scheduled-audit/README.md index c08623f8..c48f4623 100644 --- a/gh-agent-workflows/scheduled-audit/README.md +++ b/gh-agent-workflows/scheduled-audit/README.md @@ -38,6 +38,7 @@ See [example.yml](example.yml) for the full workflow file. You **must** customiz | `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]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/stale-issues/README.md b/gh-agent-workflows/stale-issues/README.md index 5a85eb7e..3c4906a1 100644 --- a/gh-agent-workflows/stale-issues/README.md +++ b/gh-agent-workflows/stale-issues/README.md @@ -40,6 +40,7 @@ mkdir -p .github/workflows && curl -sL \ | `additional-instructions` | Repo-specific instructions appended to the agent prompt | No | `""` | | `setup-commands` | Shell commands run before the agent starts | No | `""` | | `allowed-bot-users` | Allowlisted bot actor usernames (comma-separated) | No | `github-actions[bot]` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ## Safe Outputs diff --git a/gh-agent-workflows/text-auditor/README.md b/gh-agent-workflows/text-auditor/README.md index 9385e47e..7dcaafc3 100644 --- a/gh-agent-workflows/text-auditor/README.md +++ b/gh-agent-workflows/text-auditor/README.md @@ -35,6 +35,7 @@ See [example.yml](example.yml) for the full workflow file. | `edit-clarity` | How aggressively to flag unclear user-facing text (`high`/`low`/`none`) | No | `low` | | `edit-terminology` | How aggressively to flag inconsistent terminology (`high`/`low`/`none`) | No | `low` | | `edit-misleading-text` | How aggressively to flag text that conflicts with behavior (`high`/`low`/`none`) | No | `low` | +| `close-older-issues` | Whether to close older issues with the same title prefix when a new one is created | No | `true` | ### Edit Levels diff --git a/scripts/inject-configurable-close.sh b/scripts/inject-configurable-close.sh new file mode 100755 index 00000000..e2e60401 --- /dev/null +++ b/scripts/inject-configurable-close.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# Inject the close-older-issues input expression into compiled lock files. +# +# The gh-aw compiler cannot evaluate boolean expressions in safe-outputs YAML +# fields; it only accepts literal true/false. This script post-processes lock +# files that expose a close-older-issues workflow_call input by replacing the +# hardcoded "close_older_issues":true in GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG +# with ${{ inputs.close-older-issues }}, so that GitHub Actions resolves the +# value at runtime. +# +# Usage: +# ./scripts/inject-configurable-close.sh + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +WORKFLOWS_DIR="$(cd "$SCRIPT_DIR/../.github/workflows" && pwd)" + +patched=0 + +for lock_file in "$WORKFLOWS_DIR"/gh-aw-*.lock.yml; do + # Only process lock files that expose a close-older-issues workflow_call input + if ! grep -q "close-older-issues:" "$lock_file"; then + continue + fi + + # Replace the hardcoded boolean with the input expression. + # The JSON is embedded in a YAML string with escaped quotes: \"close_older_issues\":true + sed -i 's/\\"close_older_issues\\":true/\\"close_older_issues\\":${{ inputs.close-older-issues }}/g' "$lock_file" + echo " ✓ $(basename "$lock_file"): close_older_issues → \${{ inputs.close-older-issues }}" + patched=$((patched + 1)) +done + +echo "✓ inject-configurable-close: patched $patched lock file(s)"