Skip to content

Commit 77656c5

Browse files
authored
[ci] Use correct actor when checking if maintainer (facebook#32112)
1 parent 7f3826e commit 77656c5

4 files changed

+11
-1
lines changed

.github/workflows/compiler_discord_notify.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
check_maintainer:
1212
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
13+
with:
14+
actor: ${{ github.event.pull_request.user.login }}
1315

1416
notify:
1517
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}

.github/workflows/runtime_discord_notify.yml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
check_maintainer:
1212
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
13+
with:
14+
actor: ${{ github.event.pull_request.user.login }}
1315

1416
notify:
1517
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}

.github/workflows/shared_check_maintainer.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: (Shared) Check maintainer
22

33
on:
44
workflow_call:
5+
inputs:
6+
actor:
7+
required: true
8+
type: string
59
outputs:
610
is_core_team:
711
value: ${{ jobs.check_maintainer.outputs.is_core_team }}
@@ -24,7 +28,7 @@ jobs:
2428
with:
2529
script: |
2630
const fs = require('fs');
27-
const actor = '${{ github.actor }}';
31+
const actor = '${{ inputs.actor }}';
2832
const data = await fs.readFileSync('./MAINTAINERS', { encoding: 'utf8' });
2933
const maintainers = new Set(data.split('\n'));
3034
if (maintainers.has(actor)) {

.github/workflows/shared_label_core_team_prs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ env:
1111
jobs:
1212
check_maintainer:
1313
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
14+
with:
15+
actor: ${{ github.event.pull_request.user.login }}
1416

1517
label:
1618
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}

0 commit comments

Comments
 (0)