From 93803476576f80472b6a3d23176334659e41b20a Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Tue, 17 Sep 2024 17:12:02 -0500 Subject: [PATCH 1/2] moved assign PR author job outside of build --- .github/workflows/assign-PR-author.yml | 22 ++++++++++++++++++++++ .github/workflows/build.yml | 17 ----------------- 2 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/assign-PR-author.yml diff --git a/.github/workflows/assign-PR-author.yml b/.github/workflows/assign-PR-author.yml new file mode 100644 index 00000000000..355934bd5e8 --- /dev/null +++ b/.github/workflows/assign-PR-author.yml @@ -0,0 +1,22 @@ +name: Assign PR author +on: + pull_request: + types: [opened, reopened, ready_for_review] + +jobs: + assign-author: + name: Assign PR author + runs-on: ubuntu-latest + + steps: + - name: Assign author using github-script + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + assignees: [context.actor] + }) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd4814b338a..295ca2bc6cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,23 +50,6 @@ jobs: - run: pnpm install - run: pnpm audit - assign-author: - name: Assign PR author - runs-on: ubuntu-latest - - steps: - - name: Assign author using github-script - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.rest.issues.addAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - assignees: [context.actor] - }) - build: name: Build and lint packages needs: install From 17186269baf9d31a4af9fbb461a13a52186e218a Mon Sep 17 00:00:00 2001 From: Uyen Doan Date: Wed, 18 Sep 2024 09:49:54 -0500 Subject: [PATCH 2/2] renamed workflow and removed PR types --- .github/workflows/{assign-PR-author.yml => PR.yml} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename .github/workflows/{assign-PR-author.yml => PR.yml} (88%) diff --git a/.github/workflows/assign-PR-author.yml b/.github/workflows/PR.yml similarity index 88% rename from .github/workflows/assign-PR-author.yml rename to .github/workflows/PR.yml index 355934bd5e8..17b6be3edf1 100644 --- a/.github/workflows/assign-PR-author.yml +++ b/.github/workflows/PR.yml @@ -1,7 +1,6 @@ -name: Assign PR author +name: PR on: pull_request: - types: [opened, reopened, ready_for_review] jobs: assign-author: