From 29cf20365d067ee802efe6f90bf55c923370f554 Mon Sep 17 00:00:00 2001 From: Mathieu Veber <veberm8@gmail.com> Date: Thu, 5 Dec 2024 12:51:50 +0100 Subject: [PATCH] feat: Replace custom `deps` type by `chore` --- .github/actions/set-labels/action.yml | 12 ++++-------- .github/workflows/bulk-approve-please.yml | 5 ++--- .github/workflows/release-please.yml | 2 +- .github/workflows/update-please.yml | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/actions/set-labels/action.yml b/.github/actions/set-labels/action.yml index 79c1319..c3ee187 100644 --- a/.github/actions/set-labels/action.yml +++ b/.github/actions/set-labels/action.yml @@ -15,7 +15,7 @@ runs: github-token: ${{ inputs.github-token }} script: | const { NUMBER, OWNER, REPO, TITLE } = process.env - const regex = /^(build|chore|ci|deps|docs|feat|fix|perf|refactor|revert|style|test)(?:\((\S+)\))?(!)?: (.+)$/; + const regex = /^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(?:\((\S+)\))?(!)?: (.+)$/; const releaseRegex = /^chore\(\S*\): release/; console.log(`Checking title "${TITLE}"`); @@ -43,17 +43,13 @@ runs: else if (labels.includes("feature")) { labels.push("minor"); } - else if (labels.includes("fix")) { - labels.push("patch"); + else if (releaseRegex.test(TITLE)) { + labels.push("autorelease: pending"); } - else if (labels.includes("deps")) { + else { labels.push("patch"); } - if (releaseRegex.test(TITLE)) { - labels.push("autorelease: pending"); - } - console.log(`@${OWNER}/${REPO}#${NUMBER}: Setting labels to ${labels}`); await github.rest.issues.setLabels({ diff --git a/.github/workflows/bulk-approve-please.yml b/.github/workflows/bulk-approve-please.yml index 4ffc006..95d06ca 100644 --- a/.github/workflows/bulk-approve-please.yml +++ b/.github/workflows/bulk-approve-please.yml @@ -23,12 +23,11 @@ on: type: choice description: PR must have label required: true - default: deps + default: chore options: - build - chore - ci - - deps - docs - style - test @@ -37,7 +36,7 @@ on: description: PR title must match required: true options: - - "deps: update dependencies" + - "chore: Update dependencies" action: type: choice description: Action to perform diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 2f13d81..8d8472b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -59,7 +59,7 @@ jobs: release-type: node token: ${{ secrets.HEDIA_BOT_GITHUB_PAT }} default-branch: ${{ github.ref_name }} - changelog-types: '[{"type":"feat","section":"New Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"revert","section":"Reverted Changes","hidden":false},{"type":"perf","section":"Performance Improvements","hidden":false},{"type":"refactor","section":"Code Refactoring","hidden":false},{"type":"build","section":"Build Process","hidden":false},{"type":"ci","section":"CI/CD","hidden":false},{"type":"test","section":"Testing","hidden":false},{"type":"chore","section":"Chores","hidden":false},{"type":"deps","section":"Dependencies Update","hidden":false},{"type":"docs","section":"Documentation Updates","hidden":false},{"type":"style","section":"Code Formatting","hidden":false}]' + changelog-types: '[{"type":"feat","section":"New Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"revert","section":"Reverted Changes","hidden":false},{"type":"perf","section":"Performance Improvements","hidden":false},{"type":"refactor","section":"Code Refactoring","hidden":false},{"type":"build","section":"Build Process","hidden":false},{"type":"ci","section":"CI/CD","hidden":false},{"type":"test","section":"Testing","hidden":false},{"type":"chore","section":"Chores","hidden":false},{"type":"docs","section":"Documentation Updates","hidden":false},{"type":"style","section":"Pleasing Robots","hidden":false}]' outputs: release_created: ${{ steps.release-please.outputs.release_created }} diff --git a/.github/workflows/update-please.yml b/.github/workflows/update-please.yml index bfe6771..e766162 100644 --- a/.github/workflows/update-please.yml +++ b/.github/workflows/update-please.yml @@ -69,4 +69,4 @@ jobs: force: true github-token: ${{ secrets.HEDIA_BOT_GITHUB_PAT }} head: "update-please-${{ github.run_id }}" - title: "deps: Update dependencies" + title: "chore: Update dependencies"