[ci] Use correct actor when checking if maintainer (#32112)

This commit is contained in:
lauren
2025-01-17 12:42:07 -05:00
committed by GitHub
parent 7f3826e8e4
commit 77656c557a
4 changed files with 11 additions and 1 deletions

View File

@@ -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' }}

View File

@@ -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' }}

View File

@@ -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 }}
@@ -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)) {

View File

@@ -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' }}