Skip to content

Commit

Permalink
Merge pull request #31 from inovait/commit-summary-trim
Browse files Browse the repository at this point in the history
fix(git-changelog-generator): commits with leading spaces not properly processed
  • Loading branch information
matejdro authored Jun 28, 2024
2 parents f1de3f2 + f5cae8a commit 76344f9
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Example usage:
```yaml
- name: Generate Changelog
uses: inovait/actions-common/git-changelog-generator@v7
uses: inovait/actions-common/git-changelog-generator@v8
with:
from: efe8dc92136a28e3f9ace97e7af9ae456fd9e2d0
to: e31a0104ee0f9831e061a62c555c9db211885b1f
Expand All @@ -86,7 +86,7 @@ Example usage:

```yaml
- name: Generate Changelog
uses: inovait/actions-common/changelog-since-last-build@v7
uses: inovait/actions-common/changelog-since-last-build@v8
with:
git_commit_url_prefix: 'https://github.com/inovait/actions-common/commit/'
jira_url: 'https://inova-it.atlassian.net/'
Expand Down
2 changes: 1 addition & 1 deletion bump-version/dist/index.js

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

2 changes: 1 addition & 1 deletion bump-version/dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions git-changelog-generator/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ then you can add the changelog action:
```yaml
- name: Generate Changelog
uses: inovait/actions-common/git-changelog-generator@v7
uses: inovait/actions-common/git-changelog-generator@v8
with:
from: efe8dc92136a28e3f9ace97e7af9ae456fd9e2d0
to: e31a0104ee0f9831e061a62c555c9db211885b1f
Expand All @@ -37,7 +37,7 @@ You can also use `changelog` action step output in your workflow scripts. For ex

```yaml
- name: Generate Changelog
uses: inovait/actions-common/git-changelog-generator@v7
uses: inovait/actions-common/git-changelog-generator@v8
id: my_changelog
with:
...
Expand Down
2 changes: 1 addition & 1 deletion git-changelog-generator/dist/index.js

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

2 changes: 1 addition & 1 deletion git-changelog-generator/dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions git-changelog-generator/test/generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test('generate changelog for a minor release', () => {
),
createFakeCommit(
'962b3eb5cd9c6c9673ab2d818a560fe1a18765bb',
'fix: use SupervisorJob on ViewModel',
' fix: use SupervisorJob on ViewModel',
'2018-11-20T07:48:42+01:00',
),
createFakeCommit(
Expand All @@ -83,7 +83,7 @@ test('generate changelog for a minor release', () => {
),
createFakeCommit(
'1ef779cdc35cf5844bb78965658cb818901a61a6',
'feat: remove ResourceLiveData.setValue deprecation',
'feat: remove ResourceLiveData.setValue deprecation ',
'2018-11-07T07:43:33+01:00',
),
createFakeCommit(
Expand Down
2 changes: 1 addition & 1 deletion jira-get-tickets-from-commits/dist/index.js

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

2 changes: 1 addition & 1 deletion jira-get-tickets-from-commits/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/src/commit-parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function parseCommits(commits: Commit[]): ParsedCommit[] {
const commitRegex = /^(\[(?:([A-Z]{2,6}-[0-9]+)|#([0-9]+))] )?([a-zA-Z]+)(\((.+)\))?(!?):(.*)/

return commits.filter(rawCommit => rawCommit.parents.split(' ').length === 1).map(rawCommit => {
const summary: string = rawCommit.summary
const summary: string = rawCommit.summary.trim()
const body = rawCommit.body

const match = commitRegex.exec(summary)
Expand Down

0 comments on commit 76344f9

Please sign in to comment.