@@ -3,13 +3,6 @@ name: "PR Review check"
33on :
44 workflow_call :
55 inputs :
6- github-token :
7- description : >
8- Token used to enable auto-merge, comment on the PR, and change PR milestone/label.
9- This token CANNOT be the default `GITHUB_TOKEN` if auto-merge is set, otherwise the merge of the PR will not trigger a build.
10- Or similarly, if labeled and milestoned events are expected to trigger a new build.
11- required : true
12- type : string
136 trigger-labels :
147 description : JSON object mapping the list of labels that should trigger the validation
158 required : true
1811 description : Milestone to set on the PR when validation is triggered
1912 required : true
2013 type : string
14+ secrets :
15+ BOT_GITHUB_TOKEN :
16+ description : >
17+ Token used to enable auto-merge, comment on the PR, and change PR milestone/label.
18+ This token CANNOT be the default `GITHUB_TOKEN` if auto-merge is set, otherwise the merge of the PR will not trigger a build.
19+ Or similarly, if labeled and milestoned events are expected to trigger a new build.
20+ required : true
21+ type : string
2122
2223env :
2324 DEPENDABOT_CREATOR : ' dependabot[bot]'
@@ -37,15 +38,15 @@ jobs:
3738 uses : Alfresco/alfresco-build-tools/.github/actions/github-trigger-approved-pr@c295ecd6ca6b9c473dcada1e0478cdeaba79d5ea # v9.0.0
3839 with :
3940 creator : ${{ env.DEPENDABOT_CREATOR }}
40- github-token : ${{ inputs.github-token }}
41+ github-token : ${{ secrets.BOT_GITHUB_TOKEN }}
4142 milestone-on-approval : ${{ inputs.milestone-name }}
4243 auto-merge-on-approval : true
4344
4445 - name : Trigger validation on labeling, unless token is readonly (dependabot/fork) or milestone
4546 if : github.event_name == 'pull_request' && github.event.action == 'labeled' && github.secret_source == 'Actions' && inputs.milestone-name != ''
4647 uses : Alfresco/alfresco-build-tools/.github/actions/github-trigger-labeled-pr@c295ecd6ca6b9c473dcada1e0478cdeaba79d5ea # v9.0.0
4748 with :
48- github-token : ${{ inputs.github-token }}
49+ github-token : ${{ secrets.BOT_GITHUB_TOKEN }}
4950 labels : ${{ inputs.trigger-labels }}
5051 milestone : ${{ inputs.milestone-name }}
5152 force-trigger : true
0 commit comments