From 984650ce764d9eab2ca5e202cf425c996e8e1fe6 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Wed, 16 Apr 2025 17:50:59 -0400 Subject: [PATCH 1/2] [ci] Fix check_access again I can see the value being output and set correctly but not sure why it's skipping the 2nd job. --- .github/workflows/compiler_discord_notify.yml | 10 +++++----- .github/workflows/runtime_discord_notify.yml | 10 +++++----- .github/workflows/shared_label_core_team_prs.yml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/compiler_discord_notify.yml b/.github/workflows/compiler_discord_notify.yml index 21202a800459c..71aea56e8492f 100644 --- a/.github/workflows/compiler_discord_notify.yml +++ b/.github/workflows/compiler_discord_notify.yml @@ -13,15 +13,15 @@ jobs: check_access: runs-on: ubuntu-latest outputs: - is_member_or_collaborator: ${{ steps.check_access.outputs.is_member_or_collaborator }} + is_member_or_collaborator: ${{ steps.check_is_member_or_collaborator.outputs.is_member_or_collaborator }} steps: - - name: Check access - id: check_access + - name: Check is member or collaborator + id: check_is_member_or_collaborator if: ${{ github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR' }} - run: echo "is_member_or_collaborator='true'" >> "$GITHUB_OUTPUT" + run: echo "is_member_or_collaborator=true" >> "$GITHUB_OUTPUT" check_maintainer: - if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' }} + if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' || needs.check_access.outputs.is_member_or_collaborator == true }} needs: [check_access] uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main permissions: diff --git a/.github/workflows/runtime_discord_notify.yml b/.github/workflows/runtime_discord_notify.yml index c3240ef88eb2a..44775fbe78880 100644 --- a/.github/workflows/runtime_discord_notify.yml +++ b/.github/workflows/runtime_discord_notify.yml @@ -13,15 +13,15 @@ jobs: check_access: runs-on: ubuntu-latest outputs: - is_member_or_collaborator: ${{ steps.check_access.outputs.is_member_or_collaborator }} + is_member_or_collaborator: ${{ steps.check_is_member_or_collaborator.outputs.is_member_or_collaborator }} steps: - - name: Check access - id: check_access + - name: Check is member or collaborator + id: check_is_member_or_collaborator if: ${{ github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR' }} - run: echo "is_member_or_collaborator='true'" >> "$GITHUB_OUTPUT" + run: echo "is_member_or_collaborator=true" >> "$GITHUB_OUTPUT" check_maintainer: - if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' }} + if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' || needs.check_access.outputs.is_member_or_collaborator == true }} needs: [check_access] uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main permissions: diff --git a/.github/workflows/shared_label_core_team_prs.yml b/.github/workflows/shared_label_core_team_prs.yml index df75ff50429a1..73e7261f566cb 100644 --- a/.github/workflows/shared_label_core_team_prs.yml +++ b/.github/workflows/shared_label_core_team_prs.yml @@ -14,15 +14,15 @@ jobs: check_access: runs-on: ubuntu-latest outputs: - is_member_or_collaborator: ${{ steps.check_access.outputs.is_member_or_collaborator }} + is_member_or_collaborator: ${{ steps.check_is_member_or_collaborator.outputs.is_member_or_collaborator }} steps: - - name: Check access - id: check_access + - name: Check is member or collaborator + id: check_is_member_or_collaborator if: ${{ github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR' }} - run: echo "is_member_or_collaborator='true'" >> "$GITHUB_OUTPUT" + run: echo "is_member_or_collaborator=true" >> "$GITHUB_OUTPUT" check_maintainer: - if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' }} + if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' || needs.check_access.outputs.is_member_or_collaborator == true }} needs: [check_access] uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main permissions: From 62b0e1ad11c3b8b35d8ff67b423426c6a70be9ec Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Wed, 16 Apr 2025 17:56:39 -0400 Subject: [PATCH 2/2] [ci] Only label on PR open No reason to label it every update, only do it once when it's first opened. --- .github/workflows/shared_label_core_team_prs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/shared_label_core_team_prs.yml b/.github/workflows/shared_label_core_team_prs.yml index 73e7261f566cb..fd4aa9399e386 100644 --- a/.github/workflows/shared_label_core_team_prs.yml +++ b/.github/workflows/shared_label_core_team_prs.yml @@ -2,6 +2,7 @@ name: (Shared) Label Core Team PRs on: pull_request_target: + types: [opened] permissions: {}