From d2b05a1e62584cdfb8477f91dfa77f8da8cc9c09 Mon Sep 17 00:00:00 2001 From: Ben Knutson Date: Wed, 18 Feb 2026 16:36:38 +0000 Subject: [PATCH] Refactor Github Action per b/485167538 --- .github/workflows/issue-labels.yml | 9 ++++++--- .github/workflows/unit_tests.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/issue-labels.yml b/.github/workflows/issue-labels.yml index 342ea977c..17ea44a70 100644 --- a/.github/workflows/issue-labels.yml +++ b/.github/workflows/issue-labels.yml @@ -16,13 +16,16 @@ jobs: - name: Check if the comment is from the OP id: check-op run: | - OP=${{ github.event.issue.user.login }} - COMMENTER=${{ github.event.comment.user.login }} + OP=${GITHUB_EVENT_ISSUE_USER_LOGIN} + COMMENTER=${GITHUB_EVENT_COMMENT_USER_LOGIN} if [ "$OP" = "$COMMENTER" ]; then echo "op_comment=true" >> $GITHUB_ENV else echo "op_comment=false" >> $GITHUB_ENV fi + env: + GITHUB_EVENT_ISSUE_USER_LOGIN: ${{ github.event.issue.user.login }} + GITHUB_EVENT_COMMENT_USER_LOGIN: ${{ github.event.comment.user.login }} - name: Add 'Needs Attention' label if OP responded if: env.op_comment == 'true' uses: actions-ecosystem/action-add-labels@v1 @@ -48,4 +51,4 @@ jobs: with: labels: 'Needs Attention' env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index c0c3175ff..d7dba0842 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -57,14 +57,18 @@ jobs: if: matrix.target == 'html' run: | melos exec \ - --scope=${{ matrix.package }}* \ + --scope=${MATRIX_PACKAGE}* \ --dir-exists="test" \ --fail-fast -- "flutter test --platform chrome" + env: + MATRIX_PACKAGE: ${{ matrix.package }} - name: Run unit tests if: matrix.target == 'io' run: | melos exec \ - --scope=${{ matrix.package }}* \ + --scope=${MATRIX_PACKAGE}* \ --dir-exists="test" \ --fail-fast -- "flutter test" + env: + MATRIX_PACKAGE: ${{ matrix.package }}