From d367dd021c370a178f831f7bbb4106bd563dd403 Mon Sep 17 00:00:00 2001 From: Leo Germani Date: Fri, 1 Nov 2024 16:48:33 -0300 Subject: [PATCH] chore: add workflow for changelog label --- .github/labeler.yml | 2 ++ .github/workflows/changelog.yml | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/changelog.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..60b9b8cd4a --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,2 @@ +needs-changelog: + - base-branch: ['trunk'] diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000000..de6cdb7aab --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,36 @@ +name: "Pull Request Labeler" +on: + pull_request: + types: [closed] + +jobs: + labeler: + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'trunk' + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + + comment_pr: + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'trunk' + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + name: Comment about the change log label + steps: + - name: Comment PR + uses: thollander/actions-comment-pull-request@v3 + with: + message: | + Hey @${{ github.event.pull_request.assignee.login }}, good job getting this PR merged! :tada: + + Now, the `needs-changelog` label has been added to it. + + Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. + + If it does, please add an entry to it to our shared document, with screenshots and testing instructions if applicable, then remove the label. + + Thank you! :heart: