From c7afc45149df96f3863fcb744b8760e99b37c69b Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Wed, 20 Jul 2022 22:52:37 +0800 Subject: [PATCH] ci: refine add assignees trigger (#1629) --- .github/workflows/update-pr-metadata.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-pr-metadata.yml b/.github/workflows/update-pr-metadata.yml index 23be5b39d..081f9fe0e 100644 --- a/.github/workflows/update-pr-metadata.yml +++ b/.github/workflows/update-pr-metadata.yml @@ -24,11 +24,14 @@ jobs: github-token: ${{ github.token }} - name: Add assignees - if: github.event_name == 'pull_request' + if: | + github.event_name == 'pull_request' && + contains(fromJson('["opened", "reopened"]'), github.event.action) && + !endsWith(github.event.pull_request.user.login, '[bot]') uses: actions-ecosystem/action-add-assignees@v1 with: github_token: ${{ github.token }} - assignees: ${{ github.actor }} + assignees: ${{ github.event.pull_request.user.login }} pr-size-diff: runs-on: ubuntu-latest