From c77bcc172b53192479ab40afcf42b599921990c7 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Wed, 13 Apr 2022 15:46:57 +0800 Subject: [PATCH] ci: add assignees (#547) --- .../workflows/add-labels-and-assignees.yml | 24 +++++++++++++++++++ .github/workflows/add-labels.yml | 16 ------------- 2 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/add-labels-and-assignees.yml delete mode 100644 .github/workflows/add-labels.yml diff --git a/.github/workflows/add-labels-and-assignees.yml b/.github/workflows/add-labels-and-assignees.yml new file mode 100644 index 000000000..6092bd0ff --- /dev/null +++ b/.github/workflows/add-labels-and-assignees.yml @@ -0,0 +1,24 @@ +name: Add Labels And Assignees + +on: + issues: + types: [opened, edited, reopened] + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + add_labels_and_assignees: + runs-on: ubuntu-latest + steps: + - name: Add Labels + uses: logto-io/actions-add-labels-run-steps@v1.0.1 + with: + title: ${{ github.event.pull_request.title || github.event.issue.title }} + github-token: ${{ github.token }} + + - name: Add Assignees + if: ${{ github.event_name == 'pull_request' }} + uses: actions-ecosystem/action-add-assignees@v1 + with: + github_token: ${{ github.token }} + assignees: ${{ github.actor }} diff --git a/.github/workflows/add-labels.yml b/.github/workflows/add-labels.yml deleted file mode 100644 index 4c8d5e33c..000000000 --- a/.github/workflows/add-labels.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Add Labels - -on: - issues: - types: [opened, edited, reopened] - pull_request: - types: [opened, edited, synchronize, reopened] - -jobs: - add_labels: - runs-on: ubuntu-latest - steps: - - uses: logto-io/actions-add-labels-run-steps@v1.0.1 - with: - title: ${{ github.event.pull_request.title || github.event.issue.title }} - github-token: ${{ github.token }}