From f672c753eaa0a4e3850b307ccb9e078f31f98a5d Mon Sep 17 00:00:00 2001 From: Maurice Parrish Date: Tue, 9 Feb 2021 17:42:57 -0800 Subject: [PATCH] add post merge labeler --- .github/post_merge_labeler.yml | 2 ++ .github/workflows/pull_request_label.yml | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 .github/post_merge_labeler.yml diff --git a/.github/post_merge_labeler.yml b/.github/post_merge_labeler.yml new file mode 100644 index 000000000000..c02eb411773e --- /dev/null +++ b/.github/post_merge_labeler.yml @@ -0,0 +1,2 @@ +'needs-publishing': + - packages/*/** diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 5016184d6d11..7b048d33e669 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -1,20 +1,31 @@ # This workflow applies labels to pull requests based on the # paths that are modified in the pull request. # -# Edit `.github/labeler.yml` to configure labels. +# Edit `.github/labeler.yml` and `.github/post_merge_labeler.yml` +# to configure labels. # # For more information, see: https://github.com/actions/labeler name: Pull Request Labeler on: - - pull_request_target + pull_request_target: + types: [opened, synchronize, reopened, closed] jobs: label: runs-on: ubuntu-latest steps: - - uses: actions/labeler@main - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - sync-labels: true + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true + + post_merge_label: + if: github.event.action == 'closed' && github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/post_merge_labeler.yml