eslint-plugin-primer-react 0.0.0-20260722211726 → 0.0.0-20260723113417

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1699 @@
1
+ # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"b44a684103d0525ec05850585d878964ae0d6241cee601fc20d4dadac189d5a9","body_hash":"a93521d32c458e106e9a6fedac63f1b69834d4de0086ab6f88f7ea3ca7609e2d","compiler_version":"v0.82.14","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.71"}}
2
+ # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"b6d1443e05b8716267fa19425b99aa4f12006b4a","version":"v0.82.14"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.37","digest":"sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37","digest":"sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.37","digest":"sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.1","digest":"sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.1@sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.6.0","digest":"sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3","pinned_image":"ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3"}]}
3
+ # This file was automatically generated by gh-aw (v0.82.14). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
4
+ #
5
+ # ___ _ _
6
+ # / _ \ | | (_)
7
+ # | |_| | __ _ ___ _ __ | |_ _ ___
8
+ # | _ |/ _` |/ _ \ '_ \| __| |/ __|
9
+ # | | | | (_| | __/ | | | |_| | (__
10
+ # \_| |_/\__, |\___|_| |_|\__|_|\___|
11
+ # __/ |
12
+ # _ _ |___/
13
+ # | | | | / _| |
14
+ # | | | | ___ _ __ _ __| |_| | _____ ____
15
+ # | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
16
+ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
17
+ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
18
+ #
19
+ #
20
+ # To update this file, edit the corresponding .md file and run:
21
+ # gh aw compile
22
+ # Not all edits will cause changes to this file.
23
+ #
24
+ # For more information: https://github.github.com/gh-aw/introduction/overview/
25
+ #
26
+ # Triage assistant for new and reopened issues in eslint-plugin-primer-react.
27
+ # Reads the issue and its comments, classifies the issue type when it is unset,
28
+ # applies existing relevant labels, checks for likely duplicate or related issues,
29
+ # and asks the author for missing information only when it is genuinely needed.
30
+ # Each action carries a rationale and a confidence level; low-confidence changes are
31
+ # routed as suggestions for maintainer approval rather than applied silently.
32
+ #
33
+ # Secrets used:
34
+ # - COPILOT_GITHUB_TOKEN
35
+ # - GH_AW_GITHUB_MCP_SERVER_TOKEN
36
+ # - GH_AW_GITHUB_TOKEN
37
+ # - GITHUB_TOKEN
38
+ #
39
+ # Custom actions used:
40
+ # - actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
41
+ # - actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
42
+ # - actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
43
+ # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
44
+ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
45
+ # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 (source v9)
46
+ # - actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
47
+ # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
48
+ # - github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
49
+ #
50
+ # Container images used:
51
+ # - ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67
52
+ # - ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317
53
+ # - ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b
54
+ # - ghcr.io/github/gh-aw-mcpg:v0.4.1@sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32
55
+ # - ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b
56
+ # - ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3
57
+
58
+ name: "Issue triage"
59
+ on:
60
+ issues:
61
+ types:
62
+ - opened
63
+ - reopened
64
+
65
+ permissions: {}
66
+
67
+ concurrency:
68
+ group: "gh-aw-${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}"
69
+
70
+ run-name: "Issue triage"
71
+
72
+ jobs:
73
+ activation:
74
+ needs: pre_activation
75
+ if: needs.pre_activation.outputs.activated == 'true'
76
+ runs-on: ubuntu-slim
77
+ permissions:
78
+ actions: read
79
+ contents: read
80
+ issues: write
81
+ env:
82
+ GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
83
+ GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
84
+ outputs:
85
+ body: ${{ steps.sanitized.outputs.body }}
86
+ comment_id: ""
87
+ comment_repo: ""
88
+ daily_ai_credits_exceeded: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_exceeded == 'true' }}
89
+ daily_ai_credits_threshold: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_threshold || '' }}
90
+ daily_ai_credits_total_effective_tokens: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_total_effective_tokens || '' }}
91
+ engine_id: ${{ steps.generate_aw_info.outputs.engine_id }}
92
+ lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
93
+ model: ${{ steps.generate_aw_info.outputs.model }}
94
+ oauth_token_check_failed: ${{ steps.check-oauth-tokens.outputs.oauth_token_check_failed == 'true' }}
95
+ secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }}
96
+ setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
97
+ setup-span-id: ${{ steps.setup.outputs.span-id }}
98
+ setup-trace-id: ${{ steps.setup.outputs.trace-id }}
99
+ stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }}
100
+ text: ${{ steps.sanitized.outputs.text }}
101
+ title: ${{ steps.sanitized.outputs.title }}
102
+ steps:
103
+ - name: Setup Scripts
104
+ id: setup
105
+ uses: github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
106
+ with:
107
+ destination: ${{ runner.temp }}/gh-aw/actions
108
+ job-name: ${{ github.job }}
109
+ trace-id: ${{ needs.pre_activation.outputs.setup-trace-id }}
110
+ parent-span-id: ${{ needs.pre_activation.outputs.setup-parent-span-id || needs.pre_activation.outputs.setup-span-id }}
111
+ safe-output-artifact-client: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
112
+ env:
113
+ GH_AW_SETUP_WORKFLOW_NAME: "Issue triage"
114
+ GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/issue-triage.lock.yml@${{ github.ref }}
115
+ GH_AW_INFO_VERSION: "1.0.71"
116
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
117
+ GH_AW_INFO_ENGINE_ID: "copilot"
118
+ - name: Generate agentic run info
119
+ id: generate_aw_info
120
+ env:
121
+ GH_AW_INFO_ENGINE_ID: "copilot"
122
+ GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI"
123
+ GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-4.6' }}
124
+ GH_AW_INFO_VERSION: "1.0.71"
125
+ GH_AW_INFO_AGENT_VERSION: "1.0.71"
126
+ GH_AW_INFO_CLI_VERSION: "v0.82.14"
127
+ GH_AW_INFO_WORKFLOW_NAME: "Issue triage"
128
+ GH_AW_INFO_EXPERIMENTAL: "false"
129
+ GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
130
+ GH_AW_INFO_STAGED: "false"
131
+ GH_AW_INFO_ALLOWED_DOMAINS: '["defaults"]'
132
+ GH_AW_INFO_FIREWALL_ENABLED: "true"
133
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
134
+ GH_AW_INFO_AWMG_VERSION: ""
135
+ GH_AW_INFO_FIREWALL_TYPE: "squid"
136
+ GH_AW_COMPILED_STRICT: "true"
137
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
138
+ with:
139
+ script: |
140
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
141
+ setupGlobals(core, github, context, exec, io, getOctokit);
142
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_aw_info.cjs');
143
+ await main(core, context);
144
+ - name: Restore daily AIC usage cache
145
+ id: restore-daily-aic-cache
146
+ if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
147
+ continue-on-error: true
148
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
149
+ with:
150
+ key: agentic-workflow-usage-issuetriage-${{ github.run_id }}
151
+ restore-keys: agentic-workflow-usage-issuetriage-
152
+ path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
153
+ - name: Restore daily AIC usage cache (artifact fallback)
154
+ id: restore-daily-aic-cache-fallback
155
+ if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
156
+ continue-on-error: true
157
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
158
+ env:
159
+ GH_AW_RESTORE_DAILY_AIC_CACHE_HIT: ${{ steps.restore-daily-aic-cache.outputs.cache-hit }}
160
+ GH_AW_RESTORE_DAILY_AIC_CACHE_MATCHED_KEY: ${{ steps.restore-daily-aic-cache.outputs.cache-matched-key }}
161
+ with:
162
+ github-token: ${{ secrets.GITHUB_TOKEN }}
163
+ script: |
164
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
165
+ setupGlobals(core, github, context, exec, io, getOctokit);
166
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/restore_aic_usage_cache_fallback.cjs');
167
+ await main();
168
+ - name: Check daily workflow token guardrail
169
+ id: daily-effective-workflow-guardrail
170
+ if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
171
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
172
+ env:
173
+ GH_AW_WORKFLOW_NAME: "Issue triage"
174
+ GH_AW_WORKFLOW_ID: "issue-triage"
175
+ GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
176
+ GH_AW_WORKFLOW_DISPATCH_AW_CONTEXT: ${{ github.event.inputs.aw_context || '' }}
177
+ GH_AW_HAS_SLASH_COMMAND: "false"
178
+ GH_AW_HAS_LABEL_COMMAND: "false"
179
+ GH_AW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180
+ GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
181
+ with:
182
+ github-token: ${{ secrets.GITHUB_TOKEN }}
183
+ script: |
184
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
185
+ setupGlobals(core, github, context, exec, io, getOctokit);
186
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/check_daily_aic_workflow_guardrail.cjs');
187
+ await main();
188
+ - name: Add eyes reaction for immediate feedback
189
+ id: react
190
+ if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id
191
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
192
+ env:
193
+ GH_AW_REACTION: "eyes"
194
+ with:
195
+ github-token: ${{ secrets.GITHUB_TOKEN }}
196
+ script: |
197
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
198
+ setupGlobals(core, github, context, exec, io, getOctokit);
199
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/add_reaction.cjs');
200
+ await main();
201
+ - name: Validate COPILOT_GITHUB_TOKEN secret
202
+ id: validate-secret
203
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh" COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default
204
+ env:
205
+ COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
206
+ - name: Check for OAuth tokens
207
+ id: check-oauth-tokens
208
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/check_oauth_tokens.sh"
209
+ env:
210
+ COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
211
+ GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
212
+ GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
213
+ - name: Checkout .github and .agents folders
214
+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
215
+ with:
216
+ persist-credentials: false
217
+ sparse-checkout: |
218
+ .github
219
+ .agents
220
+ .antigravity
221
+ .claude
222
+ .codex
223
+ .gemini
224
+ .opencode
225
+ .pi
226
+ sparse-checkout-cone-mode: true
227
+ fetch-depth: 1
228
+ - name: Save agent config folders for base branch restoration
229
+ env:
230
+ GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .gemini .github .opencode .pi"
231
+ GH_AW_AGENT_FILES: "AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc"
232
+ # poutine:ignore untrusted_checkout_exec
233
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh"
234
+ - name: Check workflow lock file
235
+ id: check-lock-file
236
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
237
+ env:
238
+ GH_AW_WORKFLOW_FILE: "issue-triage.lock.yml"
239
+ GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}"
240
+ with:
241
+ script: |
242
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
243
+ setupGlobals(core, github, context, exec, io, getOctokit);
244
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/check_workflow_timestamp_api.cjs');
245
+ await main();
246
+ - name: Check compile-agentic version
247
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
248
+ env:
249
+ GH_AW_COMPILED_VERSION: "v0.82.14"
250
+ with:
251
+ script: |
252
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
253
+ setupGlobals(core, github, context, exec, io, getOctokit);
254
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/check_version_updates.cjs');
255
+ await main();
256
+ - name: Compute current body text
257
+ id: sanitized
258
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
259
+ env:
260
+ GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
261
+ with:
262
+ script: |
263
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
264
+ setupGlobals(core, github, context, exec, io, getOctokit);
265
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/compute_text.cjs');
266
+ await main();
267
+ - name: Log runtime features
268
+ if: ${{ contains(toJSON(vars), '"GH_AW_RUNTIME_FEATURES":') }}
269
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/log_runtime_features_summary.sh"
270
+ - name: Create prompt with built-in context
271
+ env:
272
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
273
+ GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
274
+ GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
275
+ GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
276
+ GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
277
+ GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }}
278
+ GH_AW_GITHUB_ACTOR: ${{ github.actor }}
279
+ GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
280
+ GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
281
+ GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
282
+ GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
283
+ # poutine:ignore untrusted_checkout_exec
284
+ run: |
285
+ bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh"
286
+ {
287
+ cat << 'GH_AW_PROMPT_d6becd4c818d87ce_EOF'
288
+ <system>
289
+ GH_AW_PROMPT_d6becd4c818d87ce_EOF
290
+ cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md"
291
+ cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md"
292
+ cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md"
293
+ cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md"
294
+ cat << 'GH_AW_PROMPT_d6becd4c818d87ce_EOF'
295
+ <safe-output-tools>
296
+ Tools: add_comment, add_labels(max:3), set_issue_type, missing_tool, missing_data, noop
297
+ </safe-output-tools>
298
+ GH_AW_PROMPT_d6becd4c818d87ce_EOF
299
+ cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md"
300
+ cat << 'GH_AW_PROMPT_d6becd4c818d87ce_EOF'
301
+ <github-context>
302
+ The following GitHub context information is available for this workflow:
303
+ {{#if github.actor}}
304
+ - **actor**: __GH_AW_GITHUB_ACTOR__
305
+ {{/if}}
306
+ {{#if github.repository}}
307
+ - **repository**: __GH_AW_GITHUB_REPOSITORY__
308
+ {{/if}}
309
+ {{#if github.workspace}}
310
+ - **workspace**: __GH_AW_GITHUB_WORKSPACE__
311
+ {{/if}}
312
+ {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}}
313
+ - **issue-number**: #__GH_AW_EXPR_802A9F6A__
314
+ {{/if}}
315
+ {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}}
316
+ - **discussion-number**: #__GH_AW_EXPR_1A3A194A__
317
+ {{/if}}
318
+ {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}}
319
+ - **pull-request-number**: #__GH_AW_EXPR_463A214A__
320
+ {{/if}}
321
+ {{#if github.event.comment.id || github.aw.context.comment_id}}
322
+ - **comment-id**: __GH_AW_EXPR_FF1D34CE__
323
+ {{/if}}
324
+ {{#if github.run_id}}
325
+ - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__
326
+ {{/if}}
327
+ </github-context>
328
+
329
+ GH_AW_PROMPT_d6becd4c818d87ce_EOF
330
+ cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md"
331
+ cat << 'GH_AW_PROMPT_d6becd4c818d87ce_EOF'
332
+ </system>
333
+ {{#runtime-import .github/workflows/issue-triage.md}}
334
+ GH_AW_PROMPT_d6becd4c818d87ce_EOF
335
+ } > "$GH_AW_PROMPT"
336
+ - name: Interpolate variables and render templates
337
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
338
+ env:
339
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
340
+ GH_AW_ENGINE_ID: "copilot"
341
+ GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
342
+ with:
343
+ script: |
344
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
345
+ setupGlobals(core, github, context, exec, io, getOctokit);
346
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs');
347
+ await main();
348
+ - name: Substitute placeholders
349
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
350
+ env:
351
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
352
+ GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
353
+ GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
354
+ GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
355
+ GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }}
356
+ GH_AW_GITHUB_ACTOR: ${{ github.actor }}
357
+ GH_AW_GITHUB_EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
358
+ GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
359
+ GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
360
+ GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
361
+ GH_AW_MCP_CLI_SERVERS_LIST: "- `github` — run `github --help` to see available tools\n- `safeoutputs` — run `safeoutputs --help` to see available tools"
362
+ GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: ${{ needs.pre_activation.outputs.activated }}
363
+ with:
364
+ script: |
365
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
366
+ setupGlobals(core, github, context, exec, io, getOctokit);
367
+
368
+ const substitutePlaceholders = require('${{ runner.temp }}/gh-aw/actions/substitute_placeholders.cjs');
369
+
370
+ // Call the substitution function
371
+ return await substitutePlaceholders({
372
+ file: process.env.GH_AW_PROMPT,
373
+ substitutions: {
374
+ GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A,
375
+ GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A,
376
+ GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A,
377
+ GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE,
378
+ GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR,
379
+ GH_AW_GITHUB_EVENT_ISSUE_NUMBER: process.env.GH_AW_GITHUB_EVENT_ISSUE_NUMBER,
380
+ GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
381
+ GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
382
+ GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
383
+ GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST,
384
+ GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED: process.env.GH_AW_NEEDS_PRE_ACTIVATION_OUTPUTS_ACTIVATED
385
+ }
386
+ });
387
+ - name: Validate prompt placeholders
388
+ env:
389
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
390
+ # poutine:ignore untrusted_checkout_exec
391
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh"
392
+ - name: Print prompt
393
+ env:
394
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
395
+ # poutine:ignore untrusted_checkout_exec
396
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh"
397
+ - name: Upload activation artifact
398
+ if: success()
399
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
400
+ with:
401
+ name: activation
402
+ include-hidden-files: true
403
+ path: |
404
+ /tmp/gh-aw/aw_info.json
405
+ /tmp/gh-aw/models.json
406
+ /tmp/gh-aw/aw-prompts/prompt.txt
407
+ /tmp/gh-aw/aw-prompts/prompt-template.txt
408
+ /tmp/gh-aw/aw-prompts/prompt-import-tree.json
409
+ /tmp/gh-aw/github_rate_limits.jsonl
410
+ /tmp/gh-aw/base
411
+ /tmp/gh-aw/.github/agents
412
+ /tmp/gh-aw/.github/skills
413
+ if-no-files-found: ignore
414
+ retention-days: 1
415
+
416
+ agent:
417
+ needs: activation
418
+ if: needs.activation.outputs.daily_ai_credits_exceeded != 'true'
419
+ runs-on: ubuntu-latest
420
+ permissions: read-all
421
+ env:
422
+ DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
423
+ GH_AW_ASSETS_ALLOWED_EXTS: ""
424
+ GH_AW_ASSETS_BRANCH: ""
425
+ GH_AW_ASSETS_MAX_SIZE_KB: 0
426
+ GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
427
+ GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
428
+ GH_AW_WORKFLOW_ID_SANITIZED: issuetriage
429
+ outputs:
430
+ agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }}
431
+ ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
432
+ aic: ${{ steps.parse-mcp-gateway.outputs.aic }}
433
+ ambient_context: ${{ steps.parse-mcp-gateway.outputs.ambient_context }}
434
+ checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
435
+ effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }}
436
+ has_patch: ${{ steps.collect_output.outputs.has_patch }}
437
+ http_400_response_error: ${{ steps.detect-agent-errors.outputs.http_400_response_error || 'false' }}
438
+ inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }}
439
+ invocation_cap_exceeded: ${{ steps.detect-agent-errors.outputs.invocation_cap_exceeded || 'false' }}
440
+ mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }}
441
+ model: ${{ needs.activation.outputs.model }}
442
+ model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }}
443
+ output: ${{ steps.collect_output.outputs.output }}
444
+ output_types: ${{ steps.collect_output.outputs.output_types }}
445
+ setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
446
+ setup-span-id: ${{ steps.setup.outputs.span-id }}
447
+ setup-trace-id: ${{ steps.setup.outputs.trace-id }}
448
+ unknown_model_ai_credits: ${{ steps.parse-mcp-gateway.outputs.unknown_model_ai_credits || 'false' }}
449
+ steps:
450
+ - name: Setup Scripts
451
+ id: setup
452
+ uses: github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
453
+ with:
454
+ destination: ${{ runner.temp }}/gh-aw/actions
455
+ job-name: ${{ github.job }}
456
+ trace-id: ${{ needs.activation.outputs.setup-trace-id }}
457
+ parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
458
+ env:
459
+ GH_AW_SETUP_WORKFLOW_NAME: "Issue triage"
460
+ GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/issue-triage.lock.yml@${{ github.ref }}
461
+ GH_AW_INFO_VERSION: "1.0.71"
462
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
463
+ GH_AW_INFO_ENGINE_ID: "copilot"
464
+ - name: Set runtime paths
465
+ id: set-runtime-paths
466
+ run: |
467
+ {
468
+ echo "GH_AW_SAFE_OUTPUTS=${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl"
469
+ echo "GH_AW_SAFE_OUTPUTS_CONFIG_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/config.json"
470
+ echo "GH_AW_SAFE_OUTPUTS_TOOLS_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/tools.json"
471
+ } >> "$GITHUB_OUTPUT"
472
+ - name: Checkout repository
473
+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
474
+ with:
475
+ persist-credentials: false
476
+ - name: Create gh-aw temp directory
477
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh"
478
+ - name: Configure gh CLI for GitHub Enterprise
479
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh"
480
+ env:
481
+ GH_TOKEN: ${{ github.token }}
482
+ - name: Download activation artifact
483
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
484
+ with:
485
+ name: activation
486
+ path: /tmp/gh-aw
487
+ - name: Configure Git credentials
488
+ env:
489
+ GITHUB_REPOSITORY: ${{ github.repository }}
490
+ GITHUB_SERVER_URL: ${{ github.server_url }}
491
+ GITHUB_TOKEN: ${{ github.token }}
492
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh"
493
+ - name: Checkout PR branch
494
+ id: checkout-pr
495
+ if: |
496
+ github.event.pull_request || github.event.issue.pull_request || github.event_name == 'workflow_dispatch' && fromJSON(github.event.inputs.aw_context || '{}').item_type == 'pull_request'
497
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
498
+ env:
499
+ GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
500
+ with:
501
+ github-token: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
502
+ script: |
503
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
504
+ setupGlobals(core, github, context, exec, io, getOctokit);
505
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs');
506
+ await main();
507
+ - name: Install GitHub Copilot CLI
508
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.71
509
+ env:
510
+ GH_HOST: github.com
511
+ - name: Install AWF binary
512
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.27.37 --rootless
513
+ - name: Determine automatic lockdown mode for GitHub MCP Server
514
+ id: determine-automatic-lockdown
515
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 (source v9)
516
+ env:
517
+ GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
518
+ GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
519
+ GH_AW_GITHUB_MIN_INTEGRITY: 'none'
520
+ with:
521
+ script: |
522
+ const determineAutomaticLockdown = require('${{ runner.temp }}/gh-aw/actions/determine_automatic_lockdown.cjs');
523
+ await determineAutomaticLockdown(github, context, core);
524
+ - name: Parse integrity filter lists
525
+ id: parse-guard-vars
526
+ env:
527
+ GH_AW_BLOCKED_USERS_VAR: ${{ vars.GH_AW_GITHUB_BLOCKED_USERS || '' }}
528
+ GH_AW_TRUSTED_USERS_VAR: ${{ vars.GH_AW_GITHUB_TRUSTED_USERS || '' }}
529
+ GH_AW_APPROVAL_LABELS_VAR: ${{ vars.GH_AW_GITHUB_APPROVAL_LABELS || '' }}
530
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/parse_guard_list.sh"
531
+ - name: Restore agent config folders from base branch
532
+ if: steps.checkout-pr.outcome == 'success'
533
+ env:
534
+ GH_AW_AGENT_FOLDERS: ".agents .antigravity .claude .codex .gemini .github .opencode .pi"
535
+ GH_AW_AGENT_FILES: "AGENTS.md ANTIGRAVITY.md CLAUDE.md GEMINI.md PI.md opencode.jsonc"
536
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh"
537
+ - name: Restore inline sub-agents from activation artifact
538
+ env:
539
+ GH_AW_SUB_AGENT_DIR: ".github/agents"
540
+ GH_AW_SUB_AGENT_EXT: ".agent.md"
541
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh"
542
+ - name: Restore inline skills from activation artifact
543
+ env:
544
+ GH_AW_SKILL_DIR: ".github/skills"
545
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh"
546
+ - name: Download container images
547
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67 ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317 ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b ghcr.io/github/gh-aw-mcpg:v0.4.1@sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32 ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3
548
+ - name: Generate Safe Outputs Config
549
+ run: |
550
+ mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
551
+ mkdir -p /tmp/gh-aw/safeoutputs
552
+ mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
553
+ cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f54b00be2d55fee7_EOF'
554
+ {"add_comment":{"max":1},"add_labels":{"allowed":["bug","documentation","enhancement","question","duplicate","good first issue","help wanted","invalid","wontfix","dependencies","a11y eng","waiting for author response","Severity-*","size: *","component: *"],"blocked":["~*","*[bot]"],"max":3,"target":"triggering"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"set_issue_type":{"allowed":["Bug","Feature","Task"],"max":1,"target":"triggering"}}
555
+ GH_AW_SAFE_OUTPUTS_CONFIG_f54b00be2d55fee7_EOF
556
+ - name: Generate Safe Outputs Tools
557
+ env:
558
+ GH_AW_TOOLS_META_JSON: |
559
+ {
560
+ "description_suffixes": {
561
+ "add_comment": " CONSTRAINTS: Maximum 1 comment(s) can be added. Supports reply_to_id for discussion threading.",
562
+ "add_labels": " CONSTRAINTS: Maximum 3 label(s) can be added. Only these labels are allowed: [\"bug\" \"documentation\" \"enhancement\" \"question\" \"duplicate\" \"good first issue\" \"help wanted\" \"invalid\" \"wontfix\" \"dependencies\" \"a11y eng\" \"waiting for author response\" \"Severity-*\" \"size: *\" \"component: *\"]. Target: triggering."
563
+ },
564
+ "repo_params": {},
565
+ "dynamic_tools": []
566
+ }
567
+ GH_AW_VALIDATION_JSON: |
568
+ {
569
+ "add_comment": {
570
+ "defaultMax": 1,
571
+ "fields": {
572
+ "body": {
573
+ "required": true,
574
+ "type": "string",
575
+ "sanitize": true,
576
+ "maxLength": 65000
577
+ },
578
+ "item_number": {
579
+ "issueOrPRNumber": true
580
+ },
581
+ "reply_to_id": {
582
+ "type": "string",
583
+ "maxLength": 256
584
+ },
585
+ "repo": {
586
+ "type": "string",
587
+ "maxLength": 256
588
+ }
589
+ }
590
+ },
591
+ "add_labels": {
592
+ "defaultMax": 5,
593
+ "fields": {
594
+ "item_number": {
595
+ "issueNumberOrTemporaryId": true
596
+ },
597
+ "labels": {
598
+ "required": true,
599
+ "type": "array"
600
+ },
601
+ "repo": {
602
+ "type": "string",
603
+ "maxLength": 256
604
+ }
605
+ }
606
+ },
607
+ "missing_data": {
608
+ "defaultMax": 20,
609
+ "fields": {
610
+ "alternatives": {
611
+ "type": "string",
612
+ "sanitize": true,
613
+ "maxLength": 256
614
+ },
615
+ "context": {
616
+ "type": "string",
617
+ "sanitize": true,
618
+ "maxLength": 256
619
+ },
620
+ "data_type": {
621
+ "type": "string",
622
+ "sanitize": true,
623
+ "maxLength": 128
624
+ },
625
+ "reason": {
626
+ "type": "string",
627
+ "sanitize": true,
628
+ "maxLength": 256
629
+ }
630
+ }
631
+ },
632
+ "missing_tool": {
633
+ "defaultMax": 20,
634
+ "fields": {
635
+ "alternatives": {
636
+ "type": "string",
637
+ "sanitize": true,
638
+ "maxLength": 512
639
+ },
640
+ "reason": {
641
+ "required": true,
642
+ "type": "string",
643
+ "sanitize": true,
644
+ "maxLength": 256
645
+ },
646
+ "tool": {
647
+ "type": "string",
648
+ "sanitize": true,
649
+ "maxLength": 128
650
+ }
651
+ }
652
+ },
653
+ "noop": {
654
+ "defaultMax": 1,
655
+ "fields": {
656
+ "message": {
657
+ "required": true,
658
+ "type": "string",
659
+ "sanitize": true,
660
+ "maxLength": 65000
661
+ }
662
+ }
663
+ },
664
+ "report_incomplete": {
665
+ "defaultMax": 5,
666
+ "fields": {
667
+ "details": {
668
+ "type": "string",
669
+ "sanitize": true,
670
+ "maxLength": 65000
671
+ },
672
+ "reason": {
673
+ "required": true,
674
+ "type": "string",
675
+ "sanitize": true,
676
+ "maxLength": 1024
677
+ }
678
+ }
679
+ },
680
+ "set_issue_type": {
681
+ "defaultMax": 5,
682
+ "fields": {
683
+ "confidence": {
684
+ "type": "string",
685
+ "enum": [
686
+ "LOW",
687
+ "MEDIUM",
688
+ "HIGH"
689
+ ],
690
+ "x-strip-on-error": true
691
+ },
692
+ "issue_number": {
693
+ "issueOrPRNumber": true
694
+ },
695
+ "issue_type": {
696
+ "required": true,
697
+ "type": "string",
698
+ "sanitize": true,
699
+ "maxLength": 128
700
+ },
701
+ "rationale": {
702
+ "type": "string",
703
+ "sanitize": true,
704
+ "maxLength": 280,
705
+ "x-strip-on-error": true
706
+ },
707
+ "repo": {
708
+ "type": "string",
709
+ "maxLength": 256
710
+ },
711
+ "suggest": {
712
+ "type": "boolean"
713
+ }
714
+ }
715
+ }
716
+ }
717
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
718
+ with:
719
+ script: |
720
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
721
+ setupGlobals(core, github, context, exec, io, getOctokit);
722
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_safe_outputs_tools.cjs');
723
+ await main();
724
+ - name: Start MCP Gateway
725
+ id: start-mcp-gateway
726
+ env:
727
+ GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST: ${{ vars.GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST || 'true' }}
728
+ GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
729
+ GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_CONFIG_PATH }}
730
+ GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_TOOLS_PATH }}
731
+ GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
732
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
733
+ run: |
734
+ set -eo pipefail
735
+ mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config"
736
+
737
+ # Export gateway environment variables for MCP config and gateway script
738
+ export MCP_GATEWAY_PORT="8080"
739
+ export MCP_GATEWAY_DOMAIN="awmg-mcpg"
740
+ export MCP_GATEWAY_HOST_DOMAIN="localhost"
741
+ MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
742
+ echo "::add-mask::${MCP_GATEWAY_API_KEY}"
743
+ export MCP_GATEWAY_API_KEY
744
+ export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads"
745
+ mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}"
746
+ export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288"
747
+ export DEBUG="*"
748
+
749
+ export GH_AW_ENGINE="copilot"
750
+ MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0')
751
+ MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0')
752
+ source "${RUNNER_TEMP}/gh-aw/actions/resolve_docker_socket_gid.sh"
753
+ export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network bridge -p 127.0.0.1:'"${MCP_GATEWAY_PORT}"':'"${MCP_GATEWAY_PORT}"' --name awmg-mcpg --add-host host.docker.internal:host-gateway --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e RUNNER_TEMP -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw -v '"${RUNNER_TEMP}"'/gh-aw/safeoutputs:'"${RUNNER_TEMP}"'/gh-aw/safeoutputs:rw ghcr.io/github/gh-aw-mcpg:v0.4.1'
754
+
755
+ mkdir -p "$HOME/.copilot"
756
+ GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
757
+ cat << GH_AW_MCP_CONFIG_cbd7e454efa3ed0c_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
758
+ {
759
+ "mcpServers": {
760
+ "github": {
761
+ "type": "stdio",
762
+ "container": "ghcr.io/github/github-mcp-server:v1.6.0",
763
+ "env": {
764
+ "GITHUB_FEATURES": "fields_param",
765
+ "GITHUB_HOST": "${GITHUB_SERVER_URL}",
766
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_MCP_SERVER_TOKEN}",
767
+ "GITHUB_READ_ONLY": "1",
768
+ "GITHUB_TOOLSETS": "issues,labels"
769
+ },
770
+ "guard-policies": {
771
+ "allow-only": {
772
+ "approval-labels": ${{ steps.parse-guard-vars.outputs.approval_labels }},
773
+ "blocked-users": ${{ steps.parse-guard-vars.outputs.blocked_users }},
774
+ "min-integrity": "none",
775
+ "repos": "all",
776
+ "trusted-users": ${{ steps.parse-guard-vars.outputs.trusted_users }}
777
+ }
778
+ }
779
+ },
780
+ "safeoutputs": {
781
+ "type": "stdio",
782
+ "container": "ghcr.io/github/gh-aw-node",
783
+ "mounts": ["\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw", "${RUNNER_TEMP}/gh-aw/safeoutputs:${RUNNER_TEMP}/gh-aw/safeoutputs:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"],
784
+ "args": ["-w", "\${GITHUB_WORKSPACE}"],
785
+ "entrypoint": "sh",
786
+ "entrypointArgs": ["-c", "sh ${RUNNER_TEMP}/gh-aw/safeoutputs/start_safe_outputs_mcp.sh"],
787
+ "env": {
788
+ "DEBUG": "*",
789
+ "DEFAULT_BRANCH": "\${DEFAULT_BRANCH}",
790
+ "GH_AW_ASSETS_ALLOWED_EXTS": "\${GH_AW_ASSETS_ALLOWED_EXTS}",
791
+ "GH_AW_ASSETS_BRANCH": "\${GH_AW_ASSETS_BRANCH}",
792
+ "GH_AW_ASSETS_MAX_SIZE_KB": "\${GH_AW_ASSETS_MAX_SIZE_KB}",
793
+ "GH_AW_MCP_LOG_DIR": "\${GH_AW_MCP_LOG_DIR}",
794
+ "GH_AW_SAFE_OUTPUTS": "\${GH_AW_SAFE_OUTPUTS}",
795
+ "GH_AW_SAFE_OUTPUTS_CONFIG_PATH": "\${GH_AW_SAFE_OUTPUTS_CONFIG_PATH}",
796
+ "GH_AW_SAFE_OUTPUTS_TOOLS_PATH": "\${GH_AW_SAFE_OUTPUTS_TOOLS_PATH}",
797
+ "GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST": "\${GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST}",
798
+ "GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}",
799
+ "GITHUB_SHA": "\${GITHUB_SHA}",
800
+ "GITHUB_TOKEN": "\${GITHUB_TOKEN}",
801
+ "GITHUB_WORKSPACE": "\${GITHUB_WORKSPACE}",
802
+ "RUNNER_TEMP": "\${RUNNER_TEMP}"
803
+ },
804
+ "guard-policies": {
805
+ "write-sink": {
806
+ "accept": [
807
+ "*"
808
+ ],
809
+ "sink-visibility": ${{ toJSON(steps.determine-automatic-lockdown.outputs.visibility) }}
810
+ }
811
+ }
812
+ }
813
+ },
814
+ "gateway": {
815
+ "port": $MCP_GATEWAY_PORT,
816
+ "domain": "${MCP_GATEWAY_DOMAIN}",
817
+ "apiKey": "${MCP_GATEWAY_API_KEY}",
818
+ "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}",
819
+ "startupTimeout": 120
820
+ }
821
+ }
822
+ GH_AW_MCP_CONFIG_cbd7e454efa3ed0c_EOF
823
+ - name: Mount MCP servers as CLIs
824
+ id: mount-mcp-clis
825
+ continue-on-error: true
826
+ env:
827
+ MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }}
828
+ MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }}
829
+ MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
830
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
831
+ with:
832
+ script: |
833
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
834
+ setupGlobals(core, github, context, exec, io);
835
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/mount_mcp_as_cli.cjs');
836
+ await main();
837
+ - name: Clean credentials
838
+ continue-on-error: true
839
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh"
840
+ - name: Audit pre-agent workspace
841
+ id: pre_agent_audit
842
+ continue-on-error: true
843
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh"
844
+ - name: Execute GitHub Copilot CLI
845
+ id: agentic_execution
846
+ # Copilot CLI tool arguments (sorted):
847
+ timeout-minutes: 15
848
+ run: |
849
+ set -o pipefail
850
+ printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt
851
+ trap 'rm -f "$HOME/.copilot/settings.json"' EXIT
852
+ mkdir -p "$HOME/.copilot"
853
+ printf '%s' '{"builtInAgents":{"rubberDuck":false}}' > "$HOME/.copilot/settings.json"
854
+ export XDG_CONFIG_HOME="$HOME"
855
+ export GH_AW_MCP_CONFIG="$HOME/.copilot/mcp-config.json"
856
+ touch /tmp/gh-aw/agent-step-summary.md
857
+ GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true)
858
+ export GH_AW_NODE_BIN
859
+ export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK"
860
+ (umask 177 && touch /tmp/gh-aw/agent-stdio.log)
861
+ GH_AW_MAX_AI_CREDITS="${GH_AW_MAX_AI_CREDITS:-1000}"
862
+ printf '%s\n' "{\"\$schema\":\"https://github.com/github/gh-aw-firewall/releases/download/v0.27.37/awf-config.schema.json\",\"network\":{\"allowDomains\":[\"api.business.githubcopilot.com\",\"api.enterprise.githubcopilot.com\",\"api.github.com\",\"api.githubcopilot.com\",\"api.individual.githubcopilot.com\",\"api.snapcraft.io\",\"archive.ubuntu.com\",\"azure.archive.ubuntu.com\",\"crl.geotrust.com\",\"crl.globalsign.com\",\"crl.identrust.com\",\"crl.sectigo.com\",\"crl.thawte.com\",\"crl.usertrust.com\",\"crl.verisign.com\",\"crl3.digicert.com\",\"crl4.digicert.com\",\"crls.ssl.com\",\"github.com\",\"host.docker.internal\",\"json-schema.org\",\"json.schemastore.org\",\"keyserver.ubuntu.com\",\"ocsp.digicert.com\",\"ocsp.geotrust.com\",\"ocsp.globalsign.com\",\"ocsp.identrust.com\",\"ocsp.sectigo.com\",\"ocsp.ssl.com\",\"ocsp.thawte.com\",\"ocsp.usertrust.com\",\"ocsp.verisign.com\",\"packagecloud.io\",\"packages.cloud.google.com\",\"packages.microsoft.com\",\"ppa.launchpad.net\",\"raw.githubusercontent.com\",\"registry.npmjs.org\",\"s.symcb.com\",\"s.symcd.com\",\"security.ubuntu.com\",\"telemetry.enterprise.githubcopilot.com\",\"ts-crl.ws.symantec.com\",\"ts-ocsp.ws.symantec.com\",\"www.googleapis.com\"],\"isolation\":true,\"topologyAttach\":[\"awmg-mcpg\"]},\"apiProxy\":{\"enabled\":true,\"enableTokenSteering\":true,\"maxRuns\":500,\"maxAiCredits\":${GH_AW_MAX_AI_CREDITS},\"maxCacheMisses\":5,\"models\":{\"agent\":[\"sonnet-6x\",\"gpt-5.4\",\"gpt-5.3\",\"gemini-pro\",\"any\"],\"antigravity\":[\"copilot/antigravity*\",\"google/antigravity*\",\"gemini/antigravity*\"],\"any\":[\"copilot/*\",\"anthropic/*\",\"openai/*\",\"google/*\",\"gemini/*\"],\"claude\":[\"agent\"],\"codex\":[\"agent\"],\"coding\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\",\"gpt-5-codex\",\"kimi\"],\"computer-use\":[\"copilot/*computer-use*\",\"google/*computer-use*\",\"gemini/*computer-use*\",\"openai/*computer-use*\"],\"copilot\":[\"agent\"],\"deep-research\":[\"copilot/deep-research*\",\"copilot/o3-deep-research*\",\"copilot/o4-mini-deep-research*\",\"google/deep-research*\",\"gemini/deep-research*\",\"openai/o3-deep-research*\",\"openai/o4-mini-deep-research*\"],\"fable\":[\"copilot/*fable*\",\"anthropic/*fable*\"],\"gemini\":[\"agent\"],\"gemini-3-flash\":[\"copilot/gemini-3*flash*\",\"google/gemini-3*flash*\",\"gemini/gemini-3*flash*\"],\"gemini-3-pro\":[\"copilot/gemini-3*pro*\",\"google/gemini-3*pro*\",\"google/nano-banana*\",\"gemini/gemini-3*pro*\"],\"gemini-3.1-flash\":[\"copilot/gemini-3.1*flash*\",\"google/gemini-3.1*flash*\",\"gemini/gemini-3.1*flash*\"],\"gemini-3.1-pro\":[\"copilot/gemini-3.1*pro*\",\"google/gemini-3.1*pro*\",\"gemini/gemini-3.1*pro*\"],\"gemini-3.5-flash\":[\"copilot/gemini-3.5*flash*\",\"google/gemini-3.5*flash*\",\"gemini/gemini-3.5*flash*\"],\"gemini-flash\":[\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"],\"gemini-flash-lite\":[\"copilot/gemini-*flash*lite*\",\"google/gemini-*flash*lite*\",\"gemini/gemini-*flash*lite*\"],\"gemini-omni\":[\"copilot/gemini-omni*\",\"google/gemini-omni*\",\"gemini/gemini-omni*\"],\"gemini-pro\":[\"copilot/gemini-*pro*\",\"google/gemini-*pro*\",\"gemini/gemini-*pro*\"],\"gemma\":[\"copilot/gemma*\",\"google/gemma*\",\"gemini/gemma*\"],\"gpt-5\":[\"copilot/gpt-5*\",\"openai/gpt-5*\"],\"gpt-5-codex\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\"],\"gpt-5-mini\":[\"copilot/gpt-5*mini*\",\"openai/gpt-5*mini*\"],\"gpt-5-nano\":[\"copilot/gpt-5*nano*\",\"openai/gpt-5*nano*\"],\"gpt-5-pro\":[\"copilot/gpt-5*pro*\",\"openai/gpt-5*pro*\"],\"gpt-5.1\":[\"copilot/gpt-5.1*\",\"openai/gpt-5.1*\"],\"gpt-5.2\":[\"copilot/gpt-5.2*\",\"openai/gpt-5.2*\"],\"gpt-5.3\":[\"copilot/gpt-5.3*\",\"openai/gpt-5.3*\"],\"gpt-5.4\":[\"copilot/gpt-5.4*\",\"openai/gpt-5.4*\"],\"gpt-5.5\":[\"copilot/gpt-5.5*\",\"openai/gpt-5.5*\"],\"gpt-5.6\":[\"copilot/gpt-5.6*\",\"openai/gpt-5.6*\"],\"haiku\":[\"copilot/*haiku*\",\"anthropic/*haiku*\"],\"image-generation\":[\"copilot/gpt-image*\",\"openai/gpt-image*\",\"openai/chatgpt-image*\",\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"google/imagen*\"],\"kimi\":[\"copilot/kimi*\",\"openai/kimi*\"],\"kiwi\":[\"copilot/kiwi*\",\"openai/kiwi*\"],\"large\":[\"fable\",\"sonnet\",\"gpt-5-pro\",\"gpt-5\",\"gemini-pro\"],\"lyria\":[\"google/lyria*\",\"gemini/lyria*\",\"copilot/lyria*\"],\"mai-code\":[\"copilot/MAI-Code*\",\"copilot/mai-code*\",\"openai/MAI-Code*\"],\"mai-code-1-flash-picker\":[\"copilot/MAI-Code-1-Flash-picker*\",\"copilot/mai-code-1-flash-picker*\",\"openai/MAI-Code-1-Flash-picker*\"],\"mini\":[\"haiku\",\"gpt-5-mini\",\"gpt-5-nano\",\"gemini-flash-lite\"],\"nano-banana\":[\"copilot/nano-banana*\",\"google/nano-banana*\",\"gemini/nano-banana*\"],\"opus\":[\"copilot/*opus*\",\"anthropic/*opus*\"],\"opusplan\":[\"opus?effort=high\"],\"reasoning\":[\"copilot/o1*\",\"copilot/o3*\",\"copilot/o4*\",\"openai/o1*\",\"openai/o3*\",\"openai/o4*\"],\"robotics\":[\"copilot/*robotics*\",\"google/*robotics*\",\"gemini/*robotics*\"],\"small\":[\"mini\"],\"small-agent\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash\"],\"sonnet\":[\"copilot/*sonnet*\",\"anthropic/*sonnet*\"],\"sonnet-6x\":[\"copilot/*sonnet-4.5*\",\"copilot/*sonnet-4.6*\",\"copilot/*sonnet-4-5-*\",\"anthropic/*sonnet-4-5-*\",\"copilot/*sonnet-4-6*\",\"anthropic/*sonnet-4-6*\"],\"summarization\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash-lite\",\"mini\"],\"veo\":[\"google/veo*\",\"gemini/veo*\"],\"vision\":[\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"]}},\"container\":{\"imageTag\":\"0.27.37,squid=sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b,agent=sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67,api-proxy=sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317,cli-proxy=sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203\"},\"logging\":{\"proxyLogsDir\":\"/tmp/gh-aw/sandbox/firewall/logs\",\"auditDir\":\"/tmp/gh-aw/sandbox/firewall/audit\"}}" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
863
+ cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
864
+ export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
865
+ GH_AW_DOCKER_HOST=""
866
+ if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
867
+ GH_AW_DOCKER_HOST="${DOCKER_HOST}"
868
+ fi
869
+ if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
870
+ GH_AW_CHROOT_BINARIES_SOURCE_PATH="${RUNNER_TEMP}/gh-aw" GH_AW_CHROOT_IDENTITY_HOME="${RUNNER_TEMP}/gh-aw/home" node "${RUNNER_TEMP}/gh-aw/actions/patch_awf_chroot_config.cjs"
871
+ fi
872
+ GH_AW_TOOL_CACHE_MOUNT=""
873
+ GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
874
+ if [ -d "$GH_AW_TOOL_CACHE" ]; then
875
+ if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
876
+ GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
877
+ fi
878
+ fi
879
+ # shellcheck disable=SC1003,SC2016,SC2086
880
+ awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --skip-pull \
881
+ -- /bin/bash -c 'set +o histexpand; export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log
882
+ env:
883
+ AWF_REFLECT_ENABLED: 1
884
+ COPILOT_AGENT_RUNNER_TYPE: STANDALONE
885
+ COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode
886
+ COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
887
+ COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-4.6' }}
888
+ GH_AW_LLM_PROVIDER: github
889
+ GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
890
+ GH_AW_MAX_TURNS: ${{ vars.GH_AW_DEFAULT_MAX_TURNS || '' }}
891
+ GH_AW_PHASE: agent
892
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
893
+ GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
894
+ GH_AW_TIMEOUT_MINUTES: 15
895
+ GH_AW_VERSION: v0.82.14
896
+ GITHUB_API_URL: ${{ github.api_url }}
897
+ GITHUB_AW: true
898
+ GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows
899
+ GITHUB_HEAD_REF: ${{ github.head_ref }}
900
+ GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
901
+ GITHUB_REF_NAME: ${{ github.ref_name }}
902
+ GITHUB_SERVER_URL: ${{ github.server_url }}
903
+ GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
904
+ GITHUB_WORKSPACE: ${{ github.workspace }}
905
+ GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
906
+ GIT_AUTHOR_NAME: github-actions[bot]
907
+ GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
908
+ GIT_COMMITTER_NAME: github-actions[bot]
909
+ RUNNER_TEMP: ${{ runner.temp }}
910
+ TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }}
911
+ - name: Detect agent errors
912
+ if: always()
913
+ id: detect-agent-errors
914
+ continue-on-error: true
915
+ run: node "${RUNNER_TEMP}/gh-aw/actions/detect_agent_errors.cjs"
916
+ - name: Configure Git credentials
917
+ env:
918
+ GITHUB_REPOSITORY: ${{ github.repository }}
919
+ GITHUB_SERVER_URL: ${{ github.server_url }}
920
+ GITHUB_TOKEN: ${{ github.token }}
921
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh"
922
+ - name: Copy Copilot session state files to logs
923
+ if: always()
924
+ continue-on-error: true
925
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh"
926
+ - name: Stop MCP Gateway
927
+ if: always()
928
+ continue-on-error: true
929
+ env:
930
+ MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
931
+ MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }}
932
+ GATEWAY_PID: ${{ steps.start-mcp-gateway.outputs.gateway-pid }}
933
+ run: |
934
+ bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID"
935
+ - name: Redact secrets in logs
936
+ if: always()
937
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
938
+ with:
939
+ script: |
940
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
941
+ setupGlobals(core, github, context, exec, io, getOctokit);
942
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/redact_secrets.cjs');
943
+ await main();
944
+ env:
945
+ GH_AW_SECRET_NAMES: 'COPILOT_GITHUB_TOKEN,GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,GITHUB_TOKEN'
946
+ SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
947
+ SECRET_GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
948
+ SECRET_GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
949
+ SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
950
+ - name: Append agent step summary
951
+ if: always()
952
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/append_agent_step_summary.sh"
953
+ - name: Copy Safe Outputs
954
+ if: always()
955
+ env:
956
+ GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
957
+ run: |
958
+ mkdir -p /tmp/gh-aw
959
+ cp "$GH_AW_SAFE_OUTPUTS" /tmp/gh-aw/safeoutputs.jsonl 2>/dev/null || true
960
+ - name: Ingest agent output
961
+ id: collect_output
962
+ if: always()
963
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
964
+ env:
965
+ GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
966
+ GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
967
+ GITHUB_SERVER_URL: ${{ github.server_url }}
968
+ GITHUB_API_URL: ${{ github.api_url }}
969
+ with:
970
+ script: |
971
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
972
+ setupGlobals(core, github, context, exec, io, getOctokit);
973
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/collect_ndjson_output.cjs');
974
+ await main();
975
+ - name: Parse agent logs for step summary
976
+ if: always()
977
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
978
+ env:
979
+ GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/
980
+ GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
981
+ with:
982
+ script: |
983
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
984
+ setupGlobals(core, github, context, exec, io, getOctokit);
985
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_copilot_log.cjs');
986
+ await main();
987
+ - name: Parse MCP Gateway logs for step summary
988
+ if: always()
989
+ id: parse-mcp-gateway
990
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
991
+ with:
992
+ script: |
993
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
994
+ setupGlobals(core, github, context, exec, io, getOctokit);
995
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_mcp_gateway_log.cjs');
996
+ await main();
997
+ - name: Print firewall logs
998
+ if: always()
999
+ continue-on-error: true
1000
+ env:
1001
+ AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs
1002
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/print_firewall_logs.sh" --rootless
1003
+ - name: Parse token usage for step summary
1004
+ if: always()
1005
+ continue-on-error: true
1006
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1007
+ with:
1008
+ script: |
1009
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1010
+ setupGlobals(core, github, context, exec, io, getOctokit);
1011
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs');
1012
+ await main();
1013
+ - name: Print AWF reflect summary
1014
+ if: always()
1015
+ continue-on-error: true
1016
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1017
+ with:
1018
+ script: |
1019
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1020
+ setupGlobals(core, github, context, exec, io, getOctokit);
1021
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/awf_reflect_summary.cjs');
1022
+ await main();
1023
+ - name: Write agent output placeholder if missing
1024
+ if: always()
1025
+ run: |
1026
+ if [ ! -f /tmp/gh-aw/agent_output.json ]; then
1027
+ echo '{"items":[]}' > /tmp/gh-aw/agent_output.json
1028
+ fi
1029
+ - name: Upload agent artifacts
1030
+ if: always()
1031
+ continue-on-error: true
1032
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
1033
+ with:
1034
+ name: agent
1035
+ path: |
1036
+ /tmp/gh-aw/aw-prompts/prompt.txt
1037
+ /tmp/gh-aw/sandbox/agent/logs/
1038
+ /tmp/gh-aw/redacted-urls.log
1039
+ /tmp/gh-aw/mcp-logs/
1040
+ /tmp/gh-aw/proxy-logs/
1041
+ !/tmp/gh-aw/proxy-logs/proxy-tls/
1042
+ /tmp/gh-aw/agent_usage.json
1043
+ /tmp/gh-aw/agent-stdio.log
1044
+ /tmp/gh-aw/pre-agent-audit.txt
1045
+ /tmp/gh-aw/agent/
1046
+ /tmp/gh-aw/github_rate_limits.jsonl
1047
+ /tmp/gh-aw/safeoutputs.jsonl
1048
+ /tmp/gh-aw/agent_output.json
1049
+ /tmp/gh-aw/aw-*.patch
1050
+ /tmp/gh-aw/aw-*.bundle
1051
+ /tmp/gh-aw/awf-config.json
1052
+ /tmp/gh-aw/sandbox/firewall/logs/
1053
+ /tmp/gh-aw/sandbox/firewall/audit/
1054
+ /tmp/gh-aw/sandbox/firewall/awf-reflect.json
1055
+ if-no-files-found: ignore
1056
+
1057
+ conclusion:
1058
+ needs:
1059
+ - activation
1060
+ - agent
1061
+ - detection
1062
+ - safe_outputs
1063
+ if: >
1064
+ always() && (needs.agent.result != 'skipped' || needs.activation.outputs.lockdown_check_failed == 'true' ||
1065
+ needs.activation.outputs.oauth_token_check_failed == 'true' || needs.activation.outputs.stale_lock_file_failed == 'true' ||
1066
+ needs.activation.outputs.secret_verification_result == 'failed' || needs.activation.outputs.daily_ai_credits_exceeded == 'true')
1067
+ runs-on: ubuntu-slim
1068
+ permissions:
1069
+ contents: read
1070
+ issues: write
1071
+ pull-requests: write
1072
+ concurrency:
1073
+ group: "gh-aw-conclusion-issue-triage"
1074
+ cancel-in-progress: false
1075
+ queue: max
1076
+ env:
1077
+ GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
1078
+ outputs:
1079
+ incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }}
1080
+ noop_message: ${{ steps.noop.outputs.noop_message }}
1081
+ tools_reported: ${{ steps.missing_tool.outputs.tools_reported }}
1082
+ total_count: ${{ steps.missing_tool.outputs.total_count }}
1083
+ steps:
1084
+ - name: Setup Scripts
1085
+ id: setup
1086
+ uses: github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
1087
+ with:
1088
+ destination: ${{ runner.temp }}/gh-aw/actions
1089
+ job-name: ${{ github.job }}
1090
+ trace-id: ${{ needs.activation.outputs.setup-trace-id }}
1091
+ parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
1092
+ env:
1093
+ GH_AW_SETUP_WORKFLOW_NAME: "Issue triage"
1094
+ GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/issue-triage.lock.yml@${{ github.ref }}
1095
+ GH_AW_INFO_VERSION: "1.0.71"
1096
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
1097
+ GH_AW_INFO_ENGINE_ID: "copilot"
1098
+ - name: Download agent output artifact
1099
+ id: download-agent-output
1100
+ continue-on-error: true
1101
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
1102
+ with:
1103
+ name: agent
1104
+ path: /tmp/gh-aw/
1105
+ - name: Setup agent output environment variable
1106
+ id: setup-agent-output-env
1107
+ if: steps.download-agent-output.outcome == 'success'
1108
+ run: |
1109
+ mkdir -p /tmp/gh-aw/
1110
+ find "/tmp/gh-aw/" -type f -print
1111
+ echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
1112
+ - name: Download safe outputs items manifest
1113
+ id: download-safe-outputs-manifest
1114
+ if: always()
1115
+ continue-on-error: true
1116
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
1117
+ with:
1118
+ name: safe-outputs-items
1119
+ path: /tmp/gh-aw/
1120
+ - name: Collect usage artifact files
1121
+ if: always()
1122
+ continue-on-error: true
1123
+ run: |
1124
+ mkdir -p /tmp/gh-aw/usage/agent /tmp/gh-aw/usage/detection
1125
+ echo "Usage artifact source file status:"
1126
+ for file in /tmp/gh-aw/aw_info.json /tmp/gh-aw/aw-info.jsonl /tmp/gh-aw/agent_usage.json /tmp/gh-aw/agent_usage.jsonl /tmp/gh-aw/detection_usage.jsonl /tmp/gh-aw/evals/evals.jsonl /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/threat-detection/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/threat-detection/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/threat-detection/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl; do
1127
+ [ -f "$file" ] && echo "FOUND: $file" || echo "MISSING: $file"
1128
+ done
1129
+ [ -f /tmp/gh-aw/aw_info.json ] && cp /tmp/gh-aw/aw_info.json /tmp/gh-aw/usage/aw_info.json || true
1130
+ [ -f /tmp/gh-aw/aw-info.jsonl ] && cp /tmp/gh-aw/aw-info.jsonl /tmp/gh-aw/usage/aw-info.jsonl || true
1131
+ [ -f /tmp/gh-aw/agent_usage.json ] && cp /tmp/gh-aw/agent_usage.json /tmp/gh-aw/usage/agent_usage.json || true
1132
+ [ -f /tmp/gh-aw/agent_usage.jsonl ] && cp /tmp/gh-aw/agent_usage.jsonl /tmp/gh-aw/usage/agent_usage.jsonl || true
1133
+ [ -f /tmp/gh-aw/detection_usage.jsonl ] && cp /tmp/gh-aw/detection_usage.jsonl /tmp/gh-aw/usage/detection_usage.jsonl || true
1134
+ [ -f /tmp/gh-aw/evals/evals.jsonl ] && cp /tmp/gh-aw/evals/evals.jsonl /tmp/gh-aw/usage/evals.jsonl || true
1135
+ [ -f /tmp/gh-aw/github_rate_limits.jsonl ] && cp /tmp/gh-aw/github_rate_limits.jsonl /tmp/gh-aw/usage/github_rate_limits.jsonl || true
1136
+ [ -s /tmp/gh-aw/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl ] && cp /tmp/gh-aw/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/usage/agent/token_usage.jsonl || true
1137
+ [ -s /tmp/gh-aw/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl ] && cp /tmp/gh-aw/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/usage/agent/token_usage.jsonl || true
1138
+ [ -s /tmp/gh-aw/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl ] && cp /tmp/gh-aw/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/usage/agent/token_usage.jsonl || true
1139
+ [ -s /tmp/gh-aw/threat-detection/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl ] && cp /tmp/gh-aw/threat-detection/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/usage/detection/token_usage.jsonl || true
1140
+ [ -s /tmp/gh-aw/threat-detection/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl ] && cp /tmp/gh-aw/threat-detection/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/usage/detection/token_usage.jsonl || true
1141
+ [ -s /tmp/gh-aw/threat-detection/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl ] && cp /tmp/gh-aw/threat-detection/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl /tmp/gh-aw/usage/detection/token_usage.jsonl || true
1142
+ [ -f /tmp/gh-aw/usage/agent/token_usage.jsonl ] || : > /tmp/gh-aw/usage/agent/token_usage.jsonl
1143
+ [ -f /tmp/gh-aw/usage/detection/token_usage.jsonl ] || : > /tmp/gh-aw/usage/detection/token_usage.jsonl
1144
+ mkdir -p /tmp/gh-aw/usage/activity
1145
+ node "${RUNNER_TEMP}/gh-aw/actions/generate_usage_activity_summary.cjs"
1146
+ find /tmp/gh-aw/usage -type f -print | sort
1147
+ - name: Upload usage artifact
1148
+ if: always()
1149
+ continue-on-error: true
1150
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
1151
+ with:
1152
+ name: usage
1153
+ path: |
1154
+ /tmp/gh-aw/usage/aw_info.json
1155
+ /tmp/gh-aw/usage/aw-info.jsonl
1156
+ /tmp/gh-aw/usage/agent_usage.json
1157
+ /tmp/gh-aw/usage/agent_usage.jsonl
1158
+ /tmp/gh-aw/usage/detection_usage.jsonl
1159
+ /tmp/gh-aw/usage/evals.jsonl
1160
+ /tmp/gh-aw/usage/github_rate_limits.jsonl
1161
+ /tmp/gh-aw/usage/agent/token_usage.jsonl
1162
+ /tmp/gh-aw/usage/detection/token_usage.jsonl
1163
+ /tmp/gh-aw/usage/activity/summary.json
1164
+ if-no-files-found: ignore
1165
+ - name: Restore daily AIC usage cache
1166
+ id: restore-daily-aic-cache-conclusion
1167
+ if: always()
1168
+ continue-on-error: true
1169
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
1170
+ with:
1171
+ key: agentic-workflow-usage-issuetriage-${{ github.run_id }}
1172
+ restore-keys: agentic-workflow-usage-issuetriage-
1173
+ path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
1174
+ - name: Write daily AIC usage cache entry
1175
+ id: write-daily-aic-cache
1176
+ if: always()
1177
+ continue-on-error: true
1178
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1179
+ with:
1180
+ github-token: ${{ github.token }}
1181
+ script: |
1182
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1183
+ setupGlobals(core, github, context);
1184
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/write_daily_aic_usage_cache.cjs');
1185
+ await main();
1186
+ - name: Save daily AIC usage cache
1187
+ id: save-daily-aic-cache
1188
+ if: always()
1189
+ continue-on-error: true
1190
+ uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
1191
+ with:
1192
+ key: agentic-workflow-usage-issuetriage-${{ github.run_id }}
1193
+ path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
1194
+ - name: Upload daily AIC usage cache artifact
1195
+ id: upload-daily-aic-cache
1196
+ if: always()
1197
+ continue-on-error: true
1198
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
1199
+ with:
1200
+ name: aic-usage-cache
1201
+ path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
1202
+ if-no-files-found: ignore
1203
+ retention-days: 7
1204
+ - name: Process no-op messages
1205
+ id: noop
1206
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1207
+ env:
1208
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1209
+ GH_AW_NOOP_MAX: "1"
1210
+ GH_AW_WORKFLOW_NAME: "Issue triage"
1211
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/issue-triage.md"
1212
+ GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
1213
+ GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
1214
+ GH_AW_NOOP_REPORT_AS_ISSUE: "true"
1215
+ GH_AW_AIC: ${{ needs.agent.outputs.aic }}
1216
+ GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
1217
+ GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
1218
+ GH_AW_WORKFLOW_ID: "issue-triage"
1219
+ with:
1220
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1221
+ script: |
1222
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1223
+ setupGlobals(core, github, context, exec, io, getOctokit);
1224
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_noop_message.cjs');
1225
+ await main();
1226
+ - name: Log detection run
1227
+ id: detection_runs
1228
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1229
+ env:
1230
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1231
+ GH_AW_WORKFLOW_NAME: "Issue triage"
1232
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/issue-triage.md"
1233
+ GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
1234
+ GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }}
1235
+ GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }}
1236
+ with:
1237
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1238
+ script: |
1239
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1240
+ setupGlobals(core, github, context, exec, io, getOctokit);
1241
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_detection_runs.cjs');
1242
+ await main();
1243
+ - name: Record missing tool
1244
+ id: missing_tool
1245
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1246
+ env:
1247
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1248
+ GH_AW_MISSING_TOOL_CREATE_ISSUE: "true"
1249
+ GH_AW_WORKFLOW_NAME: "Issue triage"
1250
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/issue-triage.md"
1251
+ with:
1252
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1253
+ script: |
1254
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1255
+ setupGlobals(core, github, context, exec, io, getOctokit);
1256
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/missing_tool.cjs');
1257
+ await main();
1258
+ - name: Record incomplete
1259
+ id: report_incomplete
1260
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1261
+ env:
1262
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1263
+ GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true"
1264
+ GH_AW_WORKFLOW_NAME: "Issue triage"
1265
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/issue-triage.md"
1266
+ with:
1267
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1268
+ script: |
1269
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1270
+ setupGlobals(core, github, context, exec, io, getOctokit);
1271
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/report_incomplete_handler.cjs');
1272
+ await main();
1273
+ - name: Handle agent failure
1274
+ id: handle_agent_failure
1275
+ if: always()
1276
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1277
+ env:
1278
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1279
+ GH_AW_WORKFLOW_NAME: "Issue triage"
1280
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/issue-triage.md"
1281
+ GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
1282
+ GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
1283
+ GH_AW_WORKFLOW_ID: "issue-triage"
1284
+ GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168"
1285
+ GH_AW_ENGINE_ID: "copilot"
1286
+ GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }}
1287
+ GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }}
1288
+ GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }}
1289
+ GH_AW_AI_CREDITS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.ai_credits_rate_limit_error || 'false' }}
1290
+ GH_AW_UNKNOWN_MODEL_AI_CREDITS: ${{ needs.agent.outputs.unknown_model_ai_credits || 'false' }}
1291
+ GH_AW_AIC: ${{ needs.agent.outputs.aic }}
1292
+ GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
1293
+ GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
1294
+ GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }}
1295
+ GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }}
1296
+ GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }}
1297
+ GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }}
1298
+ GH_AW_HTTP_400_RESPONSE_ERROR: ${{ needs.agent.outputs.http_400_response_error }}
1299
+ GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com"
1300
+ GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }}
1301
+ GH_AW_OAUTH_TOKEN_CHECK_FAILED: ${{ needs.activation.outputs.oauth_token_check_failed }}
1302
+ GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }}
1303
+ GH_AW_DAILY_AI_CREDITS_EXCEEDED: ${{ needs.activation.outputs.daily_ai_credits_exceeded }}
1304
+ GH_AW_DAILY_AI_CREDITS_TOTAL_EFFECTIVE_TOKENS: ${{ needs.activation.outputs.daily_ai_credits_total_effective_tokens }}
1305
+ GH_AW_DAILY_AI_CREDITS_THRESHOLD: ${{ needs.activation.outputs.daily_ai_credits_threshold }}
1306
+ GH_AW_GROUP_REPORTS: "false"
1307
+ GH_AW_FAILURE_REPORT_AS_ISSUE: "true"
1308
+ GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true"
1309
+ GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true"
1310
+ GH_AW_TIMEOUT_MINUTES: "15"
1311
+ with:
1312
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1313
+ script: |
1314
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1315
+ setupGlobals(core, github, context, exec, io, getOctokit);
1316
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs');
1317
+ await main();
1318
+
1319
+ detection:
1320
+ needs:
1321
+ - activation
1322
+ - agent
1323
+ if: always() && needs.agent.result != 'skipped'
1324
+ runs-on: ubuntu-latest
1325
+ permissions:
1326
+ contents: read
1327
+ env:
1328
+ GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
1329
+ outputs:
1330
+ aic: ${{ steps.parse_detection_token_usage.outputs.aic }}
1331
+ detection_conclusion: ${{ steps.detection_conclusion.outputs.conclusion }}
1332
+ detection_reason: ${{ steps.detection_conclusion.outputs.reason }}
1333
+ detection_success: ${{ steps.detection_conclusion.outputs.success }}
1334
+ steps:
1335
+ - name: Setup Scripts
1336
+ id: setup
1337
+ uses: github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
1338
+ with:
1339
+ destination: ${{ runner.temp }}/gh-aw/actions
1340
+ job-name: ${{ github.job }}
1341
+ trace-id: ${{ needs.activation.outputs.setup-trace-id }}
1342
+ parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
1343
+ env:
1344
+ GH_AW_SETUP_WORKFLOW_NAME: "Issue triage"
1345
+ GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/issue-triage.lock.yml@${{ github.ref }}
1346
+ GH_AW_INFO_VERSION: "1.0.71"
1347
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
1348
+ GH_AW_INFO_ENGINE_ID: "copilot"
1349
+ - name: Download agent output artifact
1350
+ id: download-agent-output
1351
+ continue-on-error: true
1352
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
1353
+ with:
1354
+ name: agent
1355
+ path: /tmp/gh-aw/
1356
+ - name: Setup agent output environment variable
1357
+ id: setup-agent-output-env
1358
+ if: steps.download-agent-output.outcome == 'success'
1359
+ run: |
1360
+ mkdir -p /tmp/gh-aw/
1361
+ find "/tmp/gh-aw/" -type f -print
1362
+ echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
1363
+ - name: Checkout repository for patch context
1364
+ if: needs.agent.outputs.has_patch == 'true'
1365
+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1366
+ with:
1367
+ persist-credentials: false
1368
+ # --- Threat Detection ---
1369
+ - name: Clean stale firewall files from agent artifact
1370
+ run: |
1371
+ rm -rf /tmp/gh-aw/sandbox/firewall/logs
1372
+ rm -rf /tmp/gh-aw/sandbox/firewall/audit
1373
+ - name: Download container images
1374
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67 ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317 ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b
1375
+ - name: Check if detection needed
1376
+ id: detection_guard
1377
+ if: always()
1378
+ env:
1379
+ OUTPUT_TYPES: ${{ needs.agent.outputs.output_types }}
1380
+ HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
1381
+ run: |
1382
+ if [[ -n "$OUTPUT_TYPES" || "$HAS_PATCH" == "true" ]]; then
1383
+ echo "run_detection=true" >> "$GITHUB_OUTPUT"
1384
+ echo "Detection will run: output_types=$OUTPUT_TYPES, has_patch=$HAS_PATCH"
1385
+ else
1386
+ echo "run_detection=false" >> "$GITHUB_OUTPUT"
1387
+ echo "Detection skipped: no agent outputs or patches to analyze"
1388
+ fi
1389
+ - name: Clear MCP Config for detection
1390
+ if: always() && steps.detection_guard.outputs.run_detection == 'true'
1391
+ run: |
1392
+ rm -f "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json"
1393
+ rm -f "$HOME/.copilot/mcp-config.json"
1394
+ rm -f "$GITHUB_WORKSPACE/.gemini/settings.json"
1395
+ - name: Prepare threat detection files
1396
+ if: always() && steps.detection_guard.outputs.run_detection == 'true'
1397
+ run: |
1398
+ mkdir -p /tmp/gh-aw/threat-detection/aw-prompts
1399
+ rm -f /tmp/gh-aw/agent_usage.json
1400
+ cp /tmp/gh-aw/aw-prompts/prompt.txt /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt 2>/dev/null || true
1401
+ if [ ! -s /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt ]; then
1402
+ echo "::warning::ERR_VALIDATION: Missing or empty detection context prompt at /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt. Ensure the agent artifact includes /tmp/gh-aw/aw-prompts/prompt.txt. Detection will continue with fallback workflow context."
1403
+ fi
1404
+ cp /tmp/gh-aw/agent_output.json /tmp/gh-aw/threat-detection/agent_output.json 2>/dev/null || true
1405
+ for f in /tmp/gh-aw/aw-*.patch; do
1406
+ [ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true
1407
+ done
1408
+ for f in /tmp/gh-aw/aw-*.bundle; do
1409
+ [ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true
1410
+ done
1411
+ echo "Prepared threat detection files:"
1412
+ ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true
1413
+ - name: Setup threat detection
1414
+ if: always() && steps.detection_guard.outputs.run_detection == 'true'
1415
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1416
+ env:
1417
+ WORKFLOW_NAME: "Issue triage"
1418
+ WORKFLOW_DESCRIPTION: "Triage assistant for new and reopened issues in eslint-plugin-primer-react.\nReads the issue and its comments, classifies the issue type when it is unset,\napplies existing relevant labels, checks for likely duplicate or related issues,\nand asks the author for missing information only when it is genuinely needed.\nEach action carries a rationale and a confidence level; low-confidence changes are\nrouted as suggestions for maintainer approval rather than applied silently."
1419
+ HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
1420
+ with:
1421
+ script: |
1422
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1423
+ setupGlobals(core, github, context, exec, io, getOctokit);
1424
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/setup_threat_detection.cjs');
1425
+ await main();
1426
+ - name: Ensure threat-detection directory and log
1427
+ if: always() && steps.detection_guard.outputs.run_detection == 'true'
1428
+ run: |
1429
+ mkdir -p /tmp/gh-aw/threat-detection
1430
+ touch /tmp/gh-aw/threat-detection/detection.log
1431
+ - name: Setup Node.js
1432
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
1433
+ with:
1434
+ node-version: '24'
1435
+ package-manager-cache: false
1436
+ - name: Install GitHub Copilot CLI
1437
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.71
1438
+ env:
1439
+ GH_HOST: github.com
1440
+ - name: Install AWF binary
1441
+ run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.27.37
1442
+ - name: Execute GitHub Copilot CLI
1443
+ if: always() && steps.detection_guard.outputs.run_detection == 'true'
1444
+ continue-on-error: true
1445
+ id: detection_agentic_execution
1446
+ # Copilot CLI tool arguments (sorted):
1447
+ timeout-minutes: 20
1448
+ run: |
1449
+ set -o pipefail
1450
+ printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt
1451
+ trap 'rm -f "$HOME/.copilot/settings.json"' EXIT
1452
+ mkdir -p "$HOME/.copilot"
1453
+ printf '%s' '{"builtInAgents":{"rubberDuck":false}}' > "$HOME/.copilot/settings.json"
1454
+ export XDG_CONFIG_HOME="$HOME"
1455
+ touch /tmp/gh-aw/agent-step-summary.md
1456
+ GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true)
1457
+ export GH_AW_NODE_BIN
1458
+ export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK"
1459
+ (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log)
1460
+ GH_AW_MAX_AI_CREDITS="${GH_AW_MAX_AI_CREDITS:-400}"
1461
+ printf '%s\n' "{\"\$schema\":\"https://github.com/github/gh-aw-firewall/releases/download/v0.27.37/awf-config.schema.json\",\"network\":{\"allowDomains\":[\"api.business.githubcopilot.com\",\"api.enterprise.githubcopilot.com\",\"api.github.com\",\"api.githubcopilot.com\",\"api.individual.githubcopilot.com\",\"github.com\",\"host.docker.internal\",\"registry.npmjs.org\",\"telemetry.enterprise.githubcopilot.com\"]},\"apiProxy\":{\"enabled\":true,\"enableTokenSteering\":true,\"maxRuns\":500,\"maxAiCredits\":${GH_AW_MAX_AI_CREDITS},\"maxCacheMisses\":5,\"models\":{\"agent\":[\"sonnet-6x\",\"gpt-5.4\",\"gpt-5.3\",\"gemini-pro\",\"any\"],\"antigravity\":[\"copilot/antigravity*\",\"google/antigravity*\",\"gemini/antigravity*\"],\"any\":[\"copilot/*\",\"anthropic/*\",\"openai/*\",\"google/*\",\"gemini/*\"],\"claude\":[\"agent\"],\"codex\":[\"agent\"],\"coding\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\",\"gpt-5-codex\",\"kimi\"],\"computer-use\":[\"copilot/*computer-use*\",\"google/*computer-use*\",\"gemini/*computer-use*\",\"openai/*computer-use*\"],\"copilot\":[\"agent\"],\"deep-research\":[\"copilot/deep-research*\",\"copilot/o3-deep-research*\",\"copilot/o4-mini-deep-research*\",\"google/deep-research*\",\"gemini/deep-research*\",\"openai/o3-deep-research*\",\"openai/o4-mini-deep-research*\"],\"fable\":[\"copilot/*fable*\",\"anthropic/*fable*\"],\"gemini\":[\"agent\"],\"gemini-3-flash\":[\"copilot/gemini-3*flash*\",\"google/gemini-3*flash*\",\"gemini/gemini-3*flash*\"],\"gemini-3-pro\":[\"copilot/gemini-3*pro*\",\"google/gemini-3*pro*\",\"google/nano-banana*\",\"gemini/gemini-3*pro*\"],\"gemini-3.1-flash\":[\"copilot/gemini-3.1*flash*\",\"google/gemini-3.1*flash*\",\"gemini/gemini-3.1*flash*\"],\"gemini-3.1-pro\":[\"copilot/gemini-3.1*pro*\",\"google/gemini-3.1*pro*\",\"gemini/gemini-3.1*pro*\"],\"gemini-3.5-flash\":[\"copilot/gemini-3.5*flash*\",\"google/gemini-3.5*flash*\",\"gemini/gemini-3.5*flash*\"],\"gemini-flash\":[\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"],\"gemini-flash-lite\":[\"copilot/gemini-*flash*lite*\",\"google/gemini-*flash*lite*\",\"gemini/gemini-*flash*lite*\"],\"gemini-omni\":[\"copilot/gemini-omni*\",\"google/gemini-omni*\",\"gemini/gemini-omni*\"],\"gemini-pro\":[\"copilot/gemini-*pro*\",\"google/gemini-*pro*\",\"gemini/gemini-*pro*\"],\"gemma\":[\"copilot/gemma*\",\"google/gemma*\",\"gemini/gemma*\"],\"gpt-5\":[\"copilot/gpt-5*\",\"openai/gpt-5*\"],\"gpt-5-codex\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\"],\"gpt-5-mini\":[\"copilot/gpt-5*mini*\",\"openai/gpt-5*mini*\"],\"gpt-5-nano\":[\"copilot/gpt-5*nano*\",\"openai/gpt-5*nano*\"],\"gpt-5-pro\":[\"copilot/gpt-5*pro*\",\"openai/gpt-5*pro*\"],\"gpt-5.1\":[\"copilot/gpt-5.1*\",\"openai/gpt-5.1*\"],\"gpt-5.2\":[\"copilot/gpt-5.2*\",\"openai/gpt-5.2*\"],\"gpt-5.3\":[\"copilot/gpt-5.3*\",\"openai/gpt-5.3*\"],\"gpt-5.4\":[\"copilot/gpt-5.4*\",\"openai/gpt-5.4*\"],\"gpt-5.5\":[\"copilot/gpt-5.5*\",\"openai/gpt-5.5*\"],\"gpt-5.6\":[\"copilot/gpt-5.6*\",\"openai/gpt-5.6*\"],\"haiku\":[\"copilot/*haiku*\",\"anthropic/*haiku*\"],\"image-generation\":[\"copilot/gpt-image*\",\"openai/gpt-image*\",\"openai/chatgpt-image*\",\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"google/imagen*\"],\"kimi\":[\"copilot/kimi*\",\"openai/kimi*\"],\"kiwi\":[\"copilot/kiwi*\",\"openai/kiwi*\"],\"large\":[\"fable\",\"sonnet\",\"gpt-5-pro\",\"gpt-5\",\"gemini-pro\"],\"lyria\":[\"google/lyria*\",\"gemini/lyria*\",\"copilot/lyria*\"],\"mai-code\":[\"copilot/MAI-Code*\",\"copilot/mai-code*\",\"openai/MAI-Code*\"],\"mai-code-1-flash-picker\":[\"copilot/MAI-Code-1-Flash-picker*\",\"copilot/mai-code-1-flash-picker*\",\"openai/MAI-Code-1-Flash-picker*\"],\"mini\":[\"haiku\",\"gpt-5-mini\",\"gpt-5-nano\",\"gemini-flash-lite\"],\"nano-banana\":[\"copilot/nano-banana*\",\"google/nano-banana*\",\"gemini/nano-banana*\"],\"opus\":[\"copilot/*opus*\",\"anthropic/*opus*\"],\"opusplan\":[\"opus?effort=high\"],\"reasoning\":[\"copilot/o1*\",\"copilot/o3*\",\"copilot/o4*\",\"openai/o1*\",\"openai/o3*\",\"openai/o4*\"],\"robotics\":[\"copilot/*robotics*\",\"google/*robotics*\",\"gemini/*robotics*\"],\"small\":[\"mini\"],\"small-agent\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash\"],\"sonnet\":[\"copilot/*sonnet*\",\"anthropic/*sonnet*\"],\"sonnet-6x\":[\"copilot/*sonnet-4.5*\",\"copilot/*sonnet-4.6*\",\"copilot/*sonnet-4-5-*\",\"anthropic/*sonnet-4-5-*\",\"copilot/*sonnet-4-6*\",\"anthropic/*sonnet-4-6*\"],\"summarization\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash-lite\",\"mini\"],\"veo\":[\"google/veo*\",\"gemini/veo*\"],\"vision\":[\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"]}},\"container\":{\"imageTag\":\"0.27.37,squid=sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b,agent=sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67,api-proxy=sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317,cli-proxy=sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203\"},\"logging\":{\"proxyLogsDir\":\"/tmp/gh-aw/sandbox/firewall/logs\",\"auditDir\":\"/tmp/gh-aw/sandbox/firewall/audit\"}}" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
1462
+ cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
1463
+ export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
1464
+ GH_AW_DOCKER_HOST=""
1465
+ if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
1466
+ GH_AW_DOCKER_HOST="${DOCKER_HOST}"
1467
+ fi
1468
+ if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
1469
+ _GH_AW_CHROOT_JSON=$(jq -c --arg src "${RUNNER_TEMP}/gh-aw" --arg user "$(id -un)" --argjson uid "$(id -u)" --argjson gid "$(id -g)" --arg home "${RUNNER_TEMP}/gh-aw/home" '.chroot={"binariesSourcePath":$src,"identity":{"user":$user,"uid":$uid,"gid":$gid,"home":$home}}' "${RUNNER_TEMP}/gh-aw/awf-config.json") || { echo "chroot config patch failed" >&2; exit 1; }
1470
+ printf '%s\n' "$_GH_AW_CHROOT_JSON" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
1471
+ printf '%s\n' "$_GH_AW_CHROOT_JSON" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
1472
+ fi
1473
+ GH_AW_TOOL_CACHE_MOUNT=""
1474
+ GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
1475
+ if [ -d "$GH_AW_TOOL_CACHE" ]; then
1476
+ if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
1477
+ GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
1478
+ fi
1479
+ fi
1480
+ # shellcheck disable=SC1003,SC2016,SC2086
1481
+ awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --skip-pull \
1482
+ -- /bin/bash -c 'set +o histexpand; : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log
1483
+ env:
1484
+ AWF_REFLECT_ENABLED: 1
1485
+ COPILOT_AGENT_RUNNER_TYPE: STANDALONE
1486
+ COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode
1487
+ COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
1488
+ COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-4.6' }}
1489
+ GH_AW_LLM_PROVIDER: github
1490
+ GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_DETECTION_MAX_AI_CREDITS || '400' }}
1491
+ GH_AW_MAX_TURNS: ${{ vars.GH_AW_DEFAULT_MAX_TURNS || '' }}
1492
+ GH_AW_PHASE: detection
1493
+ GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
1494
+ GH_AW_TIMEOUT_MINUTES: 20
1495
+ GH_AW_VERSION: v0.82.14
1496
+ GITHUB_API_URL: ${{ github.api_url }}
1497
+ GITHUB_AW: true
1498
+ GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows
1499
+ GITHUB_HEAD_REF: ${{ github.head_ref }}
1500
+ GITHUB_REF_NAME: ${{ github.ref_name }}
1501
+ GITHUB_SERVER_URL: ${{ github.server_url }}
1502
+ GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
1503
+ GITHUB_WORKSPACE: ${{ github.workspace }}
1504
+ GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
1505
+ GIT_AUTHOR_NAME: github-actions[bot]
1506
+ GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
1507
+ GIT_COMMITTER_NAME: github-actions[bot]
1508
+ RUNNER_TEMP: ${{ runner.temp }}
1509
+ TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }}
1510
+ - name: Parse threat detection token usage for step summary
1511
+ id: parse_detection_token_usage
1512
+ if: always()
1513
+ continue-on-error: true
1514
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1515
+ env:
1516
+ GH_AW_TOKEN_USAGE_SUMMARY_TITLE: Threat Detection Token Usage
1517
+ with:
1518
+ script: |
1519
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1520
+ setupGlobals(core, github, context, exec, io, getOctokit);
1521
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs');
1522
+ await main();
1523
+ - name: Upload threat detection log
1524
+ if: always() && steps.detection_guard.outputs.run_detection == 'true'
1525
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
1526
+ with:
1527
+ name: detection
1528
+ path: /tmp/gh-aw/threat-detection/detection.log
1529
+ if-no-files-found: ignore
1530
+ - name: Parse and conclude threat detection
1531
+ id: detection_conclusion
1532
+ if: always()
1533
+ continue-on-error: true
1534
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1535
+ env:
1536
+ RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }}
1537
+ DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }}
1538
+ GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
1539
+ with:
1540
+ script: |
1541
+ try {
1542
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1543
+ setupGlobals(core, github, context, exec, io, getOctokit);
1544
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs');
1545
+ await main();
1546
+ } catch (loadErr) {
1547
+ const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false';
1548
+ const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure';
1549
+ const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr));
1550
+ core.error(msg);
1551
+ core.setOutput('reason', 'parse_error');
1552
+ if (continueOnError && !detectionExecutionFailed) {
1553
+ core.warning('\u26A0\uFE0F ' + msg);
1554
+ core.setOutput('conclusion', 'warning');
1555
+ core.setOutput('success', 'false');
1556
+ } else {
1557
+ core.setOutput('conclusion', 'failure');
1558
+ core.setOutput('success', 'false');
1559
+ core.setFailed(msg);
1560
+ }
1561
+ }
1562
+
1563
+ pre_activation:
1564
+ runs-on: ubuntu-slim
1565
+ env:
1566
+ GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
1567
+ outputs:
1568
+ activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }}
1569
+ matched_command: ''
1570
+ setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
1571
+ setup-span-id: ${{ steps.setup.outputs.span-id }}
1572
+ setup-trace-id: ${{ steps.setup.outputs.trace-id }}
1573
+ steps:
1574
+ - name: Setup Scripts
1575
+ id: setup
1576
+ uses: github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
1577
+ with:
1578
+ destination: ${{ runner.temp }}/gh-aw/actions
1579
+ job-name: ${{ github.job }}
1580
+ env:
1581
+ GH_AW_SETUP_WORKFLOW_NAME: "Issue triage"
1582
+ GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/issue-triage.lock.yml@${{ github.ref }}
1583
+ GH_AW_INFO_VERSION: "1.0.71"
1584
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
1585
+ GH_AW_INFO_ENGINE_ID: "copilot"
1586
+ - name: Check team membership for workflow
1587
+ id: check_membership
1588
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1589
+ env:
1590
+ GH_AW_REQUIRED_ROLES: "admin,maintainer,write"
1591
+ with:
1592
+ github-token: ${{ secrets.GITHUB_TOKEN }}
1593
+ script: |
1594
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1595
+ setupGlobals(core, github, context, exec, io, getOctokit);
1596
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/check_membership.cjs');
1597
+ await main();
1598
+
1599
+ safe_outputs:
1600
+ needs:
1601
+ - activation
1602
+ - agent
1603
+ - detection
1604
+ if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
1605
+ runs-on: ubuntu-slim
1606
+ permissions:
1607
+ contents: read
1608
+ issues: write
1609
+ pull-requests: write
1610
+ timeout-minutes: 45
1611
+ env:
1612
+ GH_AW_AGENT_AIC: ${{ needs.agent.outputs.aic }}
1613
+ GH_AW_AIC: ${{ needs.agent.outputs.aic }}
1614
+ GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
1615
+ GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/issue-triage"
1616
+ GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }}
1617
+ GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }}
1618
+ GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }}
1619
+ GH_AW_ENGINE_ID: "copilot"
1620
+ GH_AW_ENGINE_MODEL: ${{ needs.agent.outputs.model }}
1621
+ GH_AW_ENGINE_VERSION: "1.0.71"
1622
+ GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
1623
+ GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
1624
+ GH_AW_WORKFLOW_ID: "issue-triage"
1625
+ GH_AW_WORKFLOW_NAME: "Issue triage"
1626
+ GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/issue-triage.md"
1627
+ outputs:
1628
+ code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }}
1629
+ code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }}
1630
+ comment_id: ${{ steps.process_safe_outputs.outputs.comment_id }}
1631
+ comment_url: ${{ steps.process_safe_outputs.outputs.comment_url }}
1632
+ create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }}
1633
+ create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }}
1634
+ process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }}
1635
+ process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }}
1636
+ steps:
1637
+ - name: Setup Scripts
1638
+ id: setup
1639
+ uses: github/gh-aw-actions/setup@b6d1443e05b8716267fa19425b99aa4f12006b4a # v0.82.14
1640
+ with:
1641
+ destination: ${{ runner.temp }}/gh-aw/actions
1642
+ job-name: ${{ github.job }}
1643
+ trace-id: ${{ needs.activation.outputs.setup-trace-id }}
1644
+ parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
1645
+ env:
1646
+ GH_AW_SETUP_WORKFLOW_NAME: "Issue triage"
1647
+ GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/issue-triage.lock.yml@${{ github.ref }}
1648
+ GH_AW_INFO_VERSION: "1.0.71"
1649
+ GH_AW_INFO_AWF_VERSION: "v0.27.37"
1650
+ GH_AW_INFO_ENGINE_ID: "copilot"
1651
+ - name: Download agent output artifact
1652
+ id: download-agent-output
1653
+ continue-on-error: true
1654
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
1655
+ with:
1656
+ name: agent
1657
+ path: /tmp/gh-aw/
1658
+ - name: Setup agent output environment variable
1659
+ id: setup-agent-output-env
1660
+ if: steps.download-agent-output.outcome == 'success'
1661
+ run: |
1662
+ mkdir -p /tmp/gh-aw/
1663
+ find "/tmp/gh-aw/" -type f -print
1664
+ echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
1665
+ - name: Configure GH_HOST for enterprise compatibility
1666
+ id: ghes-host-config
1667
+ shell: bash
1668
+ run: | # zizmor: ignore[github-env] - GITHUB_SERVER_URL is set by GitHub Actions, not user input.
1669
+ # Derive GH_HOST from GITHUB_SERVER_URL so the gh CLI targets the correct
1670
+ # GitHub instance (GHES/GHEC). On github.com this is a harmless no-op.
1671
+ GH_HOST="${GITHUB_SERVER_URL#https://}"
1672
+ GH_HOST="${GH_HOST#http://}"
1673
+ echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV"
1674
+ - name: Process Safe Outputs
1675
+ id: process_safe_outputs
1676
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1677
+ env:
1678
+ GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
1679
+ GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }}
1680
+ GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
1681
+ GITHUB_SERVER_URL: ${{ github.server_url }}
1682
+ GITHUB_API_URL: ${{ github.api_url }}
1683
+ GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1},\"add_labels\":{\"allowed\":[\"bug\",\"documentation\",\"enhancement\",\"question\",\"duplicate\",\"good first issue\",\"help wanted\",\"invalid\",\"wontfix\",\"dependencies\",\"a11y eng\",\"waiting for author response\",\"Severity-*\",\"size: *\",\"component: *\"],\"blocked\":[\"~*\",\"*[bot]\"],\"max\":3,\"target\":\"triggering\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"true\"},\"report_incomplete\":{},\"set_issue_type\":{\"allowed\":[\"Bug\",\"Feature\",\"Task\"],\"max\":1,\"target\":\"triggering\"}}"
1684
+ with:
1685
+ github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
1686
+ script: |
1687
+ const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
1688
+ setupGlobals(core, github, context, exec, io, getOctokit);
1689
+ const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.cjs');
1690
+ await main();
1691
+ - name: Upload Safe Outputs Items
1692
+ if: always()
1693
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
1694
+ with:
1695
+ name: safe-outputs-items
1696
+ path: |
1697
+ /tmp/gh-aw/safe-output-items.jsonl
1698
+ /tmp/gh-aw/temporary-id-map.json
1699
+ if-no-files-found: ignore