Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge commit not ignore with ignore-commit-pattern "Merge.*" and --issue-pattern, --issue-url #195

Closed
zoonderkins opened this issue Jan 27, 2021 · 7 comments

Comments

@zoonderkins
Copy link

Im using this command npx auto-changelog --tag-prefix '' --issue-pattern "[A-Z]+-\d+" --issue-url 'https://xxx.atlassian.net/browse/{id}' --ignore-commit-pattern "^(Initial.*|Merge.*)"

The Merge pull request still exist, not ignored.

### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [1.0.0-alpha3](https://github.com/ookangzheng/test-action-semantic-release/compare/1.0.0-alpha2...1.0.0-alpha3)

> 27 January 2021

- fix: SYG-121 bac [`#40`](https://github.com/ookangzheng/test-action-semantic-release/pull/40)
- Merge pull request #40 from ookangzheng/SYG-121 [`#SYG-121`](https://xxx.atlassian.net/browse/SYG-121) [`#SYG-121`](https://xxx.atlassian.net/browse/SYG-121)
- fix: SYG-121 bac [`#SYG-121`](https://xxx.atlassian.net/browse/SYG-121)

#### [1.0.0-alpha2](https://github.com/ookangzheng/test-action-semantic-release/compare/1.0.0-alpha1...1.0.0-alpha2)

> 27 January 2021

- fix: SYG-122 local.sh typo [`#39`](https://github.com/ookangzheng/test-action-semantic-release/pull/39)
- Merge pull request #39 from ookangzheng/SYG-122 [`#SYG-122`](https://xxx.atlassian.net/browse/SYG-122) [`#SYG-122`](https://xxx.atlassian.net/browse/SYG-122)
- fix: SYG-122 local.sh typo [`#SYG-122`](https://xxx.atlassian.net/browse/SYG-122)
- chore: UNRELEASE.md [`28a274c`](https://github.com/ookangzheng/test-action-semantic-release/commit/28a274c39607f13f00b6079aeada8726e64253b5)

#### [1.0.0-alpha1](https://github.com/ookangzheng/test-action-semantic-release/compare/1.0.0-alpha0...1.0.0-alpha1)

> 27 January 2021

- fix: SYG-123 typo [`#38`](https://github.com/ookangzheng/test-action-semantic-release/pull/38)
- Merge pull request #38 from ookangzheng/SYG-123 [`#SYG-123`](httx.ps://xxx.atlassian.net/browse/SYG-123) [`#SYG-123`](https://xxx.atlassian.net/browse/SYG-123)
- fix: SYG-123 typo [`#SYG-123`](https://xx.atlassian.net/browse/SYG-123)

#### 1.0.0-alpha0

> 27 January 2021

- fix: SYG-123 init repo [`#SYG-123`](https://xxx.atlassian.net/browse/SYG-123)
@patrickp-at-work
Copy link

I can confirm this using v2.2.1

@wachunei
Copy link

It seems like it only applies the rule once and then dismisses next cases 🤔

@mbacalan
Copy link

Hello @cookpete , are you aware of this issue? We have a lot of merge commits in our git log and having them all listed is really defeating the purpose of a changelog. :/

@cookpete
Copy link
Owner

@ookangzheng Your merge commits are appearing because they are being matched as an issue fix, because of the SYG-121 style issue numbers in the merge commit text.

Maybe try --issue-pattern "[^/]([A-Z]+-\d+)" which will not match issue codes with a / before it.

Everyone else – I need an actual example of what is going wrong in order to fix it.

@wachunei
Copy link

@cookpete Here's a quick example:

  • git clone [email protected]:wachunei/directUC.git
  • yarn install
  • yarn run auto-changelog --ignore-commit-pattern "Bump" --starting-version v1.1.0 --stdout

You'll get a lost of entries with the Bump starting message

@cookpete
Copy link
Owner

Ah ok, in your case the bumps are merges, and being listed as merges in the changelog. --ignore-commit-pattern only applies to lists of commits (which appear below the lists of merges and fixes).

I guess it would make sense for --ignore-commit-pattern to apply to merge commits and fixes too? I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants