From 93c7273f1005dbfbc5382991846a5a8f8e4ae951 Mon Sep 17 00:00:00 2001 From: Ben Chambers <35960+bjchambers@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:49:29 -0800 Subject: [PATCH 1/2] ci: some fixes to labels / release drafts --- .github/labels.yml | 16 ++++++++++++++-- .github/release-drafter.yml | 19 ++++++++++++++----- .github/workflows/README.md | 1 + .github/workflows/sync-labels.yml | 2 +- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.github/labels.yml b/.github/labels.yml index e0f09d2..c23102b 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -3,7 +3,7 @@ description: Something isn't working color: "d73a4a" - name: docs - description: Improvements or additions to documentation + description: Documentation only changes color: "0075ca" - name: enhancement description: New feature or request @@ -11,15 +11,27 @@ - name: build description: Changes to Build (Yarn, NPM, Poetry, etc.) color: "e4e669" +- name: style + description: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) + color: "e4e669" - name: ci description: Changes to CI (GitHub Actions) color: "e4e669" +- name: test + description: Adding missing tests or correcting existing tests + color: "e4e669" - name: refactor - description: Improvements to code quality + description: A code change that neither fixes a bug nor adds a feature color: "e4e669" - name: revert description: Reverting earlier changes color: "e4e669" +- name: chore + description: Other changes that don't modify src or test files + color: "e4e669" +- name: perf + description: A code change that improves performance + color: "e4e669" # Labels controlling the changelog - name: highlight diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 503f02c..40d025d 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,8 +1,11 @@ name-template: 'v$RESOLVED_VERSION' tag-template: 'v$RESOLVED_VERSION' categories: - - title: 'Breaking Changes' - lables: + - title: '🏆 Highlights' + labels: + - 'highlight' + - title: '💥 Breaking Changes' + labels: - 'breaking' - title: '🚀 Features' labels: @@ -10,7 +13,7 @@ categories: - title: '🐛 Bug Fixes' labels: - 'bug' - - title: '📄 Docs' + - title: '📚 Docs' labels: - 'docs' - title: '🧰 Maintenance' @@ -21,14 +24,17 @@ categories: - 'ci' - 'refactor' - 'perf' + - 'test' + - 'style' change-template: '- $TITLE @$AUTHOR (#$NUMBER)' change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. version-resolver: major: - labels: - - 'breaking' + labels: [] minor: labels: + # Until we hit `1.0.0`, breaking changes can rev the minor version. + - 'breaking' - 'enhancement' patch: labels: @@ -52,6 +58,9 @@ autolabeler: - label: 'bug' title: - '/^fix/i' + - label: 'style' + title: + - '/^style/i' - label: 'test' title: - '/^test/i' diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 6141ad7..ccd41db 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -8,6 +8,7 @@ We currently have the following workflows: - Runs an "autolabeler" to provide labels based on title and files touched. 3. `site.yml` defines the build and deployment process for the site. 4. `release-drafter.yml`: Generates draft release notes as PRs are merged. +5. `sync-labels.yml`: Updates the labels in the project to match `.github/labels.yml`. ## Future Improvements diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 159a8f9..e931062 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: micnncim/action-label-syncer@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6de201451a2e165236d85e607094ff836fcc3a36 Mon Sep 17 00:00:00 2001 From: Ben Chambers <35960+bjchambers@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:52:06 -0800 Subject: [PATCH 2/2] disable releaser on prs --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 66797ef..85240c8 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -27,6 +27,6 @@ jobs: # Drafts your next Release notes as Pull Requests are merged into "main" - uses: release-drafter/release-drafter@v5 with: - disable-autolabeler: true + disable-releaser: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file