Skip to content

Commit

Permalink
[ci] Use correct actor when checking if maintainer (#32112)
Browse files Browse the repository at this point in the history
  • Loading branch information
poteto authored Jan 17, 2025
1 parent 7f3826e commit 77656c5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/compiler_discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}

notify:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/runtime_discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}

notify:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/shared_check_maintainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: (Shared) Check maintainer

on:
workflow_call:
inputs:
actor:
required: true
type: string
outputs:
is_core_team:
value: ${{ jobs.check_maintainer.outputs.is_core_team }}
Expand All @@ -24,7 +28,7 @@ jobs:
with:
script: |
const fs = require('fs');
const actor = '${{ github.actor }}';
const actor = '${{ inputs.actor }}';
const data = await fs.readFileSync('./MAINTAINERS', { encoding: 'utf8' });
const maintainers = new Set(data.split('\n'));
if (maintainers.has(actor)) {
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/shared_label_core_team_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:
jobs:
check_maintainer:
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
with:
actor: ${{ github.event.pull_request.user.login }}

label:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
Expand Down

0 comments on commit 77656c5

Please sign in to comment.