[ci] Use correct actor when checking if maintainer (#32112)
lauren committed
Jan 17, 2025 at 12:42 UTC
77656c557a05951643ffecdf4efdf43b8bc73d84
4 files changed
+11
-1
.github/workflows/compiler_discord_notify.yml
+2
@@ -10,6 +10,8 @@ on:
10
jobs:
11
check_maintainer:
12
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
13
+ with:
14
+ actor: ${{ github.event.pull_request.user.login }}
15
16
notify:
17
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
.github/workflows/runtime_discord_notify.yml
+2
@@ -10,6 +10,8 @@ on:
10
jobs:
11
check_maintainer:
12
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
13
+ with:
14
+ actor: ${{ github.event.pull_request.user.login }}
15
16
notify:
17
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
.github/workflows/shared_check_maintainer.yml
+5
-1
@@ -2,6 +2,10 @@ name: (Shared) Check maintainer
2
3
on:
4
workflow_call:
5
+ inputs:
6
+ actor:
7
+ required: true
8
+ type: string
9
outputs:
10
is_core_team:
11
value: ${{ jobs.check_maintainer.outputs.is_core_team }}
@@ -24,7 +28,7 @@ jobs:
28
with:
29
script: |
30
const fs = require('fs');
27
- const actor = '${{ github.actor }}';
31
+ const actor = '${{ inputs.actor }}';
32
const data = await fs.readFileSync('./MAINTAINERS', { encoding: 'utf8' });
33
const maintainers = new Set(data.split('\n'));
34
if (maintainers.has(actor)) {
.github/workflows/shared_label_core_team_prs.yml
+2
@@ -11,6 +11,8 @@ env:
11
jobs:
12
check_maintainer:
13
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
14
+ with:
15
+ actor: ${{ github.event.pull_request.user.login }}
16
17
label:
18
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}