@@ -32,24 +32,38 @@ 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+ PR_NUMBER : ${{ inputs.pr_number }}
50+ run : |
51+ already_triaged=$(bash .github/scripts/pr-already-triaged.sh "$PR_NUMBER")
52+ echo "already_triaged=$already_triaged" >> "$GITHUB_OUTPUT"
4053 - name : Check the pull request against the template
4154 id : check
55+ if : steps.prior.outputs.already_triaged == 'false'
4256 uses : actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
4357 with :
4458 script : |
4559 const prNumber = Number(context.payload.inputs.pr_number);
4660 const { data: pr } = await github.rest.pulls.get({ ...context.repo, pull_number: prNumber });
4761 if (pr.state !== 'open' || pr.draft) {
48- core.setOutput('result ', 'skip');
62+ core.setOutput('verdict ', 'skip');
4963 return;
5064 }
5165 if (pr.changed_files === 0) {
52- core.setOutput('result ', 'invalid');
66+ core.setOutput('verdict ', 'invalid');
5367 return;
5468 }
5569
@@ -122,7 +136,7 @@ jobs:
122136 if (!lint || !(checked(lint) || hasText(lint))) failed.push('Lint & tests');
123137 requireBox('Docs');
124138
125- core.setOutput('result ', failed.length > 0 ? 'missing_details' : 'pass');
139+ core.setOutput('verdict ', failed.length > 0 ? 'missing_details' : 'pass');
126140 core.setOutput('failed_sections', failed.join(', '));
127141
128142tools :
@@ -135,9 +149,6 @@ tools:
135149max-ai-credits : 100
136150
137151safe-outputs :
138- # Previews outputs in the run summary without writing anything. Remove this
139- # line once the previews look right.
140- staged : true
141152 # Keep run diagnostics in the Actions logs instead of public tracking issues.
142153 report-failure-as-issue : false
143154 report-missing-tool :
0 commit comments