@@ -32,24 +32,40 @@ jobs:
3232 check :
3333 runs-on : ubuntu-latest
3434 permissions :
35+ contents : read
3536 pull-requests : read
3637 outputs :
37- result : ${{ steps.check.outputs.result }}
38+ result : ${{ steps.check.outputs.verdict }}
3839 failed_sections : ${{ steps.check.outputs.failed_sections }}
3940 steps :
41+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
42+ with :
43+ persist-credentials : false
44+ - name : Check for prior triage
45+ id : prior
46+ env :
47+ GH_TOKEN : ${{ github.token }}
48+ GH_REPO : ${{ github.repository }}
49+ # When overriding the safe-output token, set this repository variable to its comment author's login.
50+ PR_TRIAGE_WRITER_LOGIN : ${{ vars.PR_TRIAGE_WRITER_LOGIN || (secrets.GH_AW_GITHUB_TOKEN == '' && 'github-actions[bot]') || '' }}
51+ PR_NUMBER : ${{ inputs.pr_number }}
52+ run : |
53+ already_triaged=$(bash .github/scripts/pr-already-triaged.sh "$PR_NUMBER")
54+ echo "already_triaged=$already_triaged" >> "$GITHUB_OUTPUT"
4055 - name : Check the pull request against the template
4156 id : check
57+ if : steps.prior.outputs.already_triaged == 'false'
4258 uses : actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
4359 with :
4460 script : |
4561 const prNumber = Number(context.payload.inputs.pr_number);
4662 const { data: pr } = await github.rest.pulls.get({ ...context.repo, pull_number: prNumber });
4763 if (pr.state !== 'open' || pr.draft) {
48- core.setOutput('result ', 'skip');
64+ core.setOutput('verdict ', 'skip');
4965 return;
5066 }
5167 if (pr.changed_files === 0) {
52- core.setOutput('result ', 'invalid');
68+ core.setOutput('verdict ', 'invalid');
5369 return;
5470 }
5571
@@ -122,7 +138,7 @@ jobs:
122138 if (!lint || !(checked(lint) || hasText(lint))) failed.push('Lint & tests');
123139 requireBox('Docs');
124140
125- core.setOutput('result ', failed.length > 0 ? 'missing_details' : 'pass');
141+ core.setOutput('verdict ', failed.length > 0 ? 'missing_details' : 'pass');
126142 core.setOutput('failed_sections', failed.join(', '));
127143
128144tools :
@@ -135,9 +151,6 @@ tools:
135151max-ai-credits : 100
136152
137153safe-outputs :
138- # Previews outputs in the run summary without writing anything. Remove this
139- # line once the previews look right.
140- staged : true
141154 # Keep run diagnostics in the Actions logs instead of public tracking issues.
142155 report-failure-as-issue : false
143156 report-missing-tool :
0 commit comments