From b05f5f6423ef5cdfc7fdff00c4c10dd9a4f54aff Mon Sep 17 00:00:00 2001 From: Brandon Caurel Date: Tue, 23 Apr 2024 17:15:04 +0200 Subject: [PATCH 01/12] feat: Add outputs for `type`, `scope` and `subject` (#261 by @bcaurel) * Update validatePrTitle.js * Update README.md * Update README.md --------- Co-authored-by: Jan Amann --- README.md | 4 ++-- src/validatePrTitle.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f57bac1bb..a6e405108 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,8 @@ There are two events that can be used as triggers for this action, each with dif ## Outputs -In case the validation fails, this action will populate the `error_message` ouput. +- The outputs `type`, `scope` and `subject` are populated, except for if the `wip` option is used. +- The `error_message` output will be populated in case the validation fails. [An output can be used in other steps](https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs), for example to comment the error message onto the pull request. @@ -222,4 +223,3 @@ jobs: ``` - diff --git a/src/validatePrTitle.js b/src/validatePrTitle.js index 6dff4ac79..c510ed4cd 100644 --- a/src/validatePrTitle.js +++ b/src/validatePrTitle.js @@ -29,6 +29,9 @@ module.exports = async function validatePrTitle( parserOpts.headerCorrespondence = headerPatternCorrespondence; } const result = parser(prTitle, parserOpts); + core.setOutput('type', result.type); + core.setOutput('scope', result.scope); + core.setOutput('subject', result.subject); function printAvailableTypes() { return `Available types:\n${types From c24d6dd07c69e0826c52021944f216b2e3192535 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 23 Apr 2024 15:15:42 +0000 Subject: [PATCH 02/12] chore: Release 5.5.0 [skip ci] --- CHANGELOG.md | 7 +++++++ dist/index.js | 3 +++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d35e4558..e086666d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.5.0](https://github.com/amannn/action-semantic-pull-request/compare/v5.4.0...v5.5.0) (2024-04-23) + + +### Features + +* Add outputs for `type`, `scope` and `subject` ([#261](https://github.com/amannn/action-semantic-pull-request/issues/261) by [@bcaurel](https://github.com/bcaurel)) ([b05f5f6](https://github.com/amannn/action-semantic-pull-request/commit/b05f5f6423ef5cdfc7fdff00c4c10dd9a4f54aff)) + ## [5.4.0](https://github.com/amannn/action-semantic-pull-request/compare/v5.3.0...v5.4.0) (2023-11-03) diff --git a/dist/index.js b/dist/index.js index 6ce9c09df..9b822f8d1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -37154,6 +37154,9 @@ module.exports = async function validatePrTitle( parserOpts.headerCorrespondence = headerPatternCorrespondence; } const result = parser(prTitle, parserOpts); + core.setOutput('type', result.type); + core.setOutput('scope', result.scope); + core.setOutput('subject', result.subject); function printAvailableTypes() { return `Available types:\n${types From 5e7e9acca3ddc6a9d7b640fe1f905c4fff131f4a Mon Sep 17 00:00:00 2001 From: Eelco Los <5102501+EelcoLos@users.noreply.github.com> Date: Wed, 24 Apr 2024 17:06:49 +0200 Subject: [PATCH 03/12] fix: Bump ip from 2.0.0 to 2.0.1 (#263 by @EelcoLos) Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b66db99a9..a48a4ddc0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3811,9 +3811,9 @@ ip-regex@^4.1.0: integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== ip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== is-arguments@^1.1.1: version "1.1.1" From 9ebc021bcf7ac66f840f985c84d0ef77afd5e8d9 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 24 Apr 2024 15:07:25 +0000 Subject: [PATCH 04/12] chore: Release 5.5.1 [skip ci] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e086666d8..cdf00b37f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.5.1](https://github.com/amannn/action-semantic-pull-request/compare/v5.5.0...v5.5.1) (2024-04-24) + + +### Bug Fixes + +* Bump ip from 2.0.0 to 2.0.1 ([#263](https://github.com/amannn/action-semantic-pull-request/issues/263) by @EelcoLos) ([5e7e9ac](https://github.com/amannn/action-semantic-pull-request/commit/5e7e9acca3ddc6a9d7b640fe1f905c4fff131f4a)) + ## [5.5.0](https://github.com/amannn/action-semantic-pull-request/compare/v5.4.0...v5.5.0) (2024-04-23) From 9a90d5a5ac979326e3bb9272750cdd4f192ce24a Mon Sep 17 00:00:00 2001 From: Eelco Los <5102501+EelcoLos@users.noreply.github.com> Date: Wed, 24 Apr 2024 17:08:12 +0200 Subject: [PATCH 05/12] fix: Bump tar from 6.1.11 to 6.2.1 (#262 by @EelcoLos) Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.11 to 6.2.1. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/isaacs/node-tar/compare/v6.1.11...v6.2.1) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index a48a4ddc0..edaa341f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5055,6 +5055,11 @@ minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: dependencies: yallist "^4.0.0" +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -6553,13 +6558,13 @@ supports-preserve-symlinks-flag@^1.0.0: integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: - version "6.1.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" - minipass "^3.0.0" + minipass "^5.0.0" minizlib "^2.1.1" mkdirp "^1.0.3" yallist "^4.0.0" From cfb60706e18bc85e8aec535e3c577abe8f70378e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 24 Apr 2024 15:08:47 +0000 Subject: [PATCH 06/12] chore: Release 5.5.2 [skip ci] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf00b37f..fc3d04295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.5.2](https://github.com/amannn/action-semantic-pull-request/compare/v5.5.1...v5.5.2) (2024-04-24) + + +### Bug Fixes + +* Bump tar from 6.1.11 to 6.2.1 ([#262](https://github.com/amannn/action-semantic-pull-request/issues/262) by @EelcoLos) ([9a90d5a](https://github.com/amannn/action-semantic-pull-request/commit/9a90d5a5ac979326e3bb9272750cdd4f192ce24a)) + ## [5.5.1](https://github.com/amannn/action-semantic-pull-request/compare/v5.5.0...v5.5.1) (2024-04-24) From e32d7e603df1aa1ba07e981f2a23455dee596825 Mon Sep 17 00:00:00 2001 From: Gustav Utterheim Date: Mon, 10 Jun 2024 16:38:38 +0200 Subject: [PATCH 07/12] chore: Update major tag (#268 by @gustavkj) --- .releaserc.json | 1 + package.json | 3 ++- yarn.lock | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.releaserc.json b/.releaserc.json index a7f2a663f..d8326ceac 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -5,6 +5,7 @@ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", ["@semantic-release/changelog", {"changelogTitle": "# Changelog"}], + "semantic-release-major-tag", ["@semantic-release/github", { "failComment": false, "failTitle": false, diff --git a/package.json b/package.json index 274ea6db3..18df44d2a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "eslint": "8.36.0", "eslint-config-molindo": "6.0.0", "jest": "29.5.0", - "semantic-release": "^19.0.5" + "semantic-release": "^19.0.5", + "semantic-release-major-tag": "0.3.2" }, "engines": { "node": "^20.0.0" diff --git a/yarn.lock b/yarn.lock index edaa341f4..4ea0f2a7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6149,6 +6149,11 @@ safe-regex@^2.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +semantic-release-major-tag@0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/semantic-release-major-tag/-/semantic-release-major-tag-0.3.2.tgz#9ea6b7139721fa58e8a76382adafe165d56a4b90" + integrity sha512-XTB3mVG6D6oPHSW/zhWC3eSoBRiLqZjKtjTc90wcLzS0DG00UORnn7CceDGdYc5dIl0BG91eO873HvECimyE+Q== + semantic-release@^19.0.5: version "19.0.5" resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-19.0.5.tgz#d7fab4b33fc20f1288eafd6c441e5d0938e5e174" From a663946138ae73f4864a7a8685680e3a33c0fb85 Mon Sep 17 00:00:00 2001 From: Eelco Los <5102501+EelcoLos@users.noreply.github.com> Date: Fri, 28 Jun 2024 08:59:44 +0200 Subject: [PATCH 08/12] chore(deps): Bump braces from 3.0.2 to 3.0.3 (#269 by @EelcoLos) --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4ea0f2a7a..633263565 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2044,11 +2044,11 @@ brace-expansion@^2.0.1: balanced-match "^1.0.0" braces@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" browserslist@^4.17.5: version "4.19.1" @@ -3238,10 +3238,10 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" From 2d952a1bf90a6a7ab8f0293dc86f5fdf9acb1915 Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Fri, 28 Jun 2024 09:05:10 +0200 Subject: [PATCH 09/12] fix: Bump `braces` dependency (#269. by @EelcoLos) --- yarn.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 633263565..9d3a754e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,7 +1,6 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 - "@actions/core@^1.10.0": version "1.10.0" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f" From 0723387faaf9b38adef4775cd42cfd5155ed6017 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 28 Jun 2024 07:05:45 +0000 Subject: [PATCH 10/12] chore: Release 5.5.3 [skip ci] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3d04295..9c84b94f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.5.3](https://github.com/amannn/action-semantic-pull-request/compare/v5.5.2...v5.5.3) (2024-06-28) + + +### Bug Fixes + +* Bump `braces` dependency ([#269](https://github.com/amannn/action-semantic-pull-request/issues/269). by @EelcoLos) ([2d952a1](https://github.com/amannn/action-semantic-pull-request/commit/2d952a1bf90a6a7ab8f0293dc86f5fdf9acb1915)) + ## [5.5.2](https://github.com/amannn/action-semantic-pull-request/compare/v5.5.1...v5.5.2) (2024-04-24) From 80c0371c57c5142ed6c844270bba1864bac8a4c6 Mon Sep 17 00:00:00 2001 From: Gary Sassano <10464497+garysassano@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:11:02 +0200 Subject: [PATCH 11/12] docs: Mention `reopened` trigger in README (#272 by @garysassano) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a6e405108..b070f809b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ on: - opened - edited - synchronize + - reopened permissions: pull-requests: read From d252546f3b961eefea576990c15bf41ea9e4b0f8 Mon Sep 17 00:00:00 2001 From: Dennis Zhang Date: Wed, 21 Aug 2024 15:24:56 -0700 Subject: [PATCH 12/12] feat(ops): Update readme to reflect how gorgians should use --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b070f809b..09b37951f 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ permissions: jobs: main: name: Validate PR title - runs-on: ubuntu-latest + runs-on: gh-actions-small-runner-set steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: gorgias/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` @@ -134,9 +134,9 @@ permissions: jobs: main: name: Validate PR title - runs-on: ubuntu-latest + runs-on: gh-actions-small-runner-set steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: gorgias/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -145,7 +145,7 @@ jobs: ### Legacy configuration for validating single commits -When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit. As it's easy to commit this by mistake this action supports two configuration options to provide additional validation for this case. +When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit. As it's easy to commit this by mistake this action supports two configuration options to provide additional validation for this case. ```yml # If the PR only contains a single commit, the action will validate that @@ -191,9 +191,9 @@ permissions: jobs: main: name: Validate PR title - runs-on: ubuntu-latest + runs-on: gh-actions-small-runner-set steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: gorgias/action-semantic-pull-request@v5 id: lint_pr_title env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -206,11 +206,11 @@ jobs: header: pr-title-lint-error message: | Hey there and thank you for opening this pull request! 👋🏼 - + We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. Details: - + ``` ${{ steps.lint_pr_title.outputs.error_message }} ``` @@ -218,7 +218,7 @@ jobs: # Delete a previous comment when the issue has been resolved - if: ${{ steps.lint_pr_title.outputs.error_message == null }} uses: marocchino/sticky-pull-request-comment@v2 - with: + with: header: pr-title-lint-error delete: true ```