From 3fbc98be1b0431e5120532be38c6ebae16659747 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Thu, 12 Dec 2024 03:38:34 +0000 Subject: [PATCH] add release-drafter to ccm --- .github/PULL_REQUEST_TEMPLATE.md | 13 ++++++ .github/labels.yml | 51 ++++++++++++-------- .github/release-drafter.yml | 67 +++++++++++++++++++++++++++ .github/workflows/pr-labeler.yml | 25 ++++++++++ .github/workflows/release-drafter.yml | 21 +++++++++ 5 files changed, 157 insertions(+), 20 deletions(-) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/pr-labeler.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 75ee545b..13a46e0e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,16 @@ + + ### General: * [ ] Have you removed all sensitive information, including but not limited to access keys and passwords? diff --git a/.github/labels.yml b/.github/labels.yml index f9b89f11..4ed2ef3b 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,24 +1,35 @@ -- name: added-feature +# PR Labels +- name: new-feature description: for new features in the changelog. - color: a2eeef -- name: changed - description: for changes in existing functionality in the changelog. - color: a2eeef -- name: deprecated - description: for soon-to-be removed features in the changelog. - color: e4e669 -- name: removed - description: for now removed features in the changelog. - color: e4e669 + color: 225fee +- name: improvement + description: for improvements in existing functionality in the changelog. + color: 22ee47 +- name: repo-ci-improvement + description: for improvements in the repository or CI workflow in the changelog. + color: c922ee - name: bugfix description: for any bug fixes in the changelog. - color: d73a4a -- name: security - description: for vulnerabilities in the changelog. - color: dd4739 -- name: bug - description: Something isn't working in this issue. - color: d73a4a + color: ed8e21 +- name: documentation + description: for updates to the documentation in the changelog. + color: d3e1e6 +- name: dependencies + description: dependency updates including security fixes + color: 5c9dff +- name: testing + description: for updates to the testing suite in the changelog. + color: 933ac9 +- name: breaking-change + description: for breaking changes in the changelog. + color: ff0000 +- name: ignore-for-release + description: PRs you do not want to render in the changelog. + color: 7b8eac +# Issue Labels - name: enhancement - description: New feature request in this issue. - color: a2eeef + description: issues that request a enhancement. + color: 22ee47 +- name: bug + description: issues that report a bug. + color: ed8e21 \ No newline at end of file diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..bb48aefd --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,67 @@ +name-template: 'v$NEXT_PATCH_VERSION' +tag-template: 'v$NEXT_PATCH_VERSION' +exclude-labels: + - ignore-for-release +categories: + - title: โš ๏ธ Breaking Change + labels: + - breaking-change + - title: ๐Ÿ› Bug Fixes + labels: + - bugfix + - title: ๐Ÿš€ New Features + labels: + - new-feature + - title: ๐Ÿ’ก Improvements + labels: + - improvement + - title: ๐Ÿงช Testing Improvements + labels: + - testing + - title: โš™๏ธ Repo/CI Improvements + labels: + - repo-ci-improvement + - title: ๐Ÿ“– Documentation + labels: + - documentation + - title: ๐Ÿ“ฆ Dependency Updates + labels: + - dependencies + - title: Other Changes + labels: + - "*" +autolabeler: + - label: 'breaking-change' + title: + - '/.*\[breaking\].+/' + - label: 'deprecation' + title: + - '/.*\[deprecation\].+/' + - label: 'bugfix' + title: + - '/.*\[fix\].+/' + - label: 'new-feature' + title: + - '/.*\[feat\].+/' + - label: 'improvement' + title: + - '/.*\[improvement\].+/' + - label: 'testing' + title: + - '/.*\[test\].+/' + - label: 'repo-ci-improvement' + title: + - '/.*\[CI\].+/' + - '/.*\[ci\].+/' + - label: 'documentation' + title: + - '/.*\[docs\].+/' + - label: 'dependencies' + title: + - '/.*\[deps\].+/' + +change-template: '- $TITLE by @$AUTHOR in #$NUMBER' +no-changes-template: "- No changes" +template: | + ## What's Changed + $CHANGES \ No newline at end of file diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 00000000..4d044a93 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,25 @@ +name: PR labeler + +on: + workflow_dispatch: + pull_request_target: + types: [opened, reopened, synchronize] + +jobs: + label-pr: + name: Update PR labels + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Label PR + uses: release-drafter/release-drafter@v6 + with: + disable-releaser: github.ref != 'refs/heads/main' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..bcd361ad --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,21 @@ +name: Release Drafter + +on: + workflow_dispatch: + push: + branches: + - main + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file