Skip to content

Commit

Permalink
fix: [#1247] Adds support for PR username in release notes if it is n…
Browse files Browse the repository at this point in the history
…ot possible to retrieve Github username based on commit email
  • Loading branch information
capricorn86 committed Jan 31, 2024
1 parent 0f0be8e commit 03a79ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Release

on:
push:
branches:
- master
pull_request:
types: [closed]

jobs:
check-next-version:
runs-on: ubuntu-latest
Expand All @@ -15,10 +16,13 @@ jobs:
next_version: ${{ steps.versionCheck.outputs.next_version }}
current_version: ${{ steps.versionCheck.outputs.current_version }}

if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down Expand Up @@ -58,6 +62,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down Expand Up @@ -131,6 +136,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: master

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand All @@ -153,7 +159,7 @@ jobs:
run: npm ci --ignore-scripts

- name: Generate release notes
run: node ./node_modules/.bin/happy-release-notes --author=githubUsername > ./RELEASE_NOTES.md
run: node ./node_modules/.bin/happy-release-notes --author=githubUsername --authorUsername=${{ github.event.pull_request.user.login }} > ./RELEASE_NOTES.md

- name: Create release
id: create_release
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"devDependencies": {
"@types/he": "^1.1.2",
"@types/node": "^16.11.7",
"happy-conventional-commit": "^0.0.18",
"happy-conventional-commit": "^0.1.0",
"chalk": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
Expand Down

0 comments on commit 03a79ea

Please sign in to comment.