From 77656c557a05951643ffecdf4efdf43b8bc73d84 Mon Sep 17 00:00:00 2001 From: lauren Date: Fri, 17 Jan 2025 12:42:07 -0500 Subject: [PATCH] [ci] Use correct actor when checking if maintainer (#32112) --- .github/workflows/compiler_discord_notify.yml | 2 ++ .github/workflows/runtime_discord_notify.yml | 2 ++ .github/workflows/shared_check_maintainer.yml | 6 +++++- .github/workflows/shared_label_core_team_prs.yml | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compiler_discord_notify.yml b/.github/workflows/compiler_discord_notify.yml index c21c533c0ffcd..b4694e12be94d 100644 --- a/.github/workflows/compiler_discord_notify.yml +++ b/.github/workflows/compiler_discord_notify.yml @@ -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' }} diff --git a/.github/workflows/runtime_discord_notify.yml b/.github/workflows/runtime_discord_notify.yml index 9ef578eeed974..a29735ac4ed8e 100644 --- a/.github/workflows/runtime_discord_notify.yml +++ b/.github/workflows/runtime_discord_notify.yml @@ -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' }} diff --git a/.github/workflows/shared_check_maintainer.yml b/.github/workflows/shared_check_maintainer.yml index 53f4c7a8af046..cd43ffe55979a 100644 --- a/.github/workflows/shared_check_maintainer.yml +++ b/.github/workflows/shared_check_maintainer.yml @@ -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)) { diff --git a/.github/workflows/shared_label_core_team_prs.yml b/.github/workflows/shared_label_core_team_prs.yml index 227dcee4c20b8..dc432b54f72a6 100644 --- a/.github/workflows/shared_label_core_team_prs.yml +++ b/.github/workflows/shared_label_core_team_prs.yml @@ -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' }}