Skip to content

Commit 0307dcb

Browse files
authored
Revert "use docubot token" (#16987)
* Revert "use docubot token (#16980)" This reverts commit 06e52bf. * use pull_request_target
1 parent d20831c commit 0307dcb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Check unallowed file changes
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
paths:
66
- '.github/workflows/**'
77
- '.github/CODEOWNERS'
@@ -32,12 +32,12 @@ jobs:
3232
})
3333
3434
const botReviews = pullReviews.data
35-
.filter(review => review.user.login === 'docubot')
35+
.filter(review => review.user.login === 'github-actions[bot]')
3636
.sort((a, b) => new Date(b.submitted_at) - new Date(a.submitted_at))
3737
.shift()
3838
3939
if (botReviews) {
40-
console.log(`Pull request reviews authored by docubot: ${botReviews}`)
40+
console.log(`Pull request reviews authored by the github-action bot: ${botReviews}`)
4141
}
4242
return botReviews
4343
@@ -76,7 +76,7 @@ jobs:
7676
if: ${{ steps.filter.outputs.notAllowed == 'true' && (!steps.requested-change.outputs.result || fromJson(steps.requested-change.outputs.result).state != 'CHANGES_REQUESTED') }}
7777
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
7878
with:
79-
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
79+
github-token: ${{secrets.GITHUB_TOKEN}}
8080
script: |
8181
const changedFiles = ${{steps.filter.outputs.notAllowed_files}}
8282
const restFiles = ${{steps.filter.outputs.openapi_files}}
@@ -112,7 +112,7 @@ jobs:
112112
if: ${{ steps.filter.outputs.notAllowed == 'false' && steps.requested-change.outputs.result && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }}
113113
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
114114
with:
115-
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
115+
github-token: ${{secrets.GITHUB_TOKEN}}
116116
script: |
117117
await github.pulls.dismissReview({
118118
...context.repo,

0 commit comments

Comments
 (0)