From 54244baae75dbf738d40b464e940155736a2f2a4 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Sun, 17 Sep 2023 17:03:53 -0400 Subject: [PATCH] Update Release Drafter workflow (#740) --- .github/labeler.yml | 20 -------------------- .github/release-drafter.yml | 20 ++++++++++++++++++++ .github/workflows/release-drafter.yml | 12 ++++++++++++ 3 files changed, 32 insertions(+), 20 deletions(-) delete mode 100644 .github/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index ea3e61d5bab..00000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: v1 -labels: - - label: '๐Ÿ“’ Documentation' - matcher: - title: '\b(docs|doc:|\[doc\]|README|typos|comment|documentation)\b' - - label: 'โ˜ข๏ธ Bug' - matcher: - title: '\b(fix|race|bug|missing|correct)\b' - - label: '๐Ÿงน Updates' - matcher: - title: '\b(improve|update|refactor|deprecated|remove|unused|test)\b' - - label: '๐Ÿค– Dependencies' - matcher: - title: '\b(bumb|bdependencies)\b' - - label: 'โœ๏ธ Feature' - matcher: - title: '\b(feature|feat|create|implement|add)\b' - - label: '๐Ÿค” Question' - matcher: - title: '\b(question|how)\b' diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 52a63657985..34ecbccc653 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -49,3 +49,23 @@ template: | **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION Thanks to $CONTRIBUTORS for making this release possible. + +autolabeler: +- label: '๐Ÿ“’ Documentation' + matcher: + title: '\b(docs|doc:|\[doc\]|README|typos|comment|documentation)\b' +- label: 'โ˜ข๏ธ Bug' + matcher: + title: '\b(fix|race|bug|missing|correct)\b' +- label: '๐Ÿงน Updates' + matcher: + title: '\b(improve|update|update|refactor|deprecated|remove|unused|test)\b' +- label: '๐Ÿค– Dependencies' + matcher: + title: '\b(bumb|bdependencies)\b' +- label: 'โœ๏ธ Feature' + matcher: + title: '\b(feature|feat|create|implement|add)\b' +- label: '๐Ÿค” Question' + matcher: + title: '\b(question|how)\b' \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 896edaf4a3a..5be4e3dae6b 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -4,11 +4,23 @@ on: push: branches: - main + pull_request: # Autolabel PR's + types: [opened, reopened, synchronize] + pull_request_target: # Autolabel PR's from forks + types: [opened, reopened, synchronize] jobs: update_release_draft: + permissions: + # write permission is required to create a github release + contents: write + # write permission is required for autolabeler + # otherwise, read permission is required at least + pull-requests: write runs-on: ubuntu-latest steps: - uses: release-drafter/release-drafter@v5 + with: + commitish: main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}