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

feat: adding the ability to pass a regex to filter tickets #10

Merged
merged 13 commits into from
Aug 15, 2019

Conversation

wovalle
Copy link
Contributor

@wovalle wovalle commented Jul 31, 2019

Hey, nice project!

In my company we have many jira projects and instead of passing a fixed array of prefixes, we needed to pass a regex and get the ticket name on the fly.

I added some documentation around it.

Thanks!

@GabrielCastro
Copy link
Contributor

Thanks for the contribution

lib/success.ts Outdated
let patterns: RegExp[] = [];

if (config.ticketRegex) {
patterns = [new RegExp(escapeRegExp(config.ticketRegex), 'giu')];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should remove the escapeRegExp call here otherwise it won't match

@wovalle
Copy link
Contributor Author

wovalle commented Aug 15, 2019

Hey! Sorry it took me so long to reply, I was on vacations!

I updated the function and added a couple of tests to verify that everything works correctly :)

@wovalle
Copy link
Contributor Author

wovalle commented Aug 15, 2019

cc @guigonc

@GabrielCastro
Copy link
Contributor

Thanks for the change including setting up tests 💯

@GabrielCastro GabrielCastro merged commit 71b535f into UpHabit:master Aug 15, 2019
GabrielCastro pushed a commit that referenced this pull request Aug 15, 2019
# [0.3.0](v0.2.1...v0.3.0) (2019-08-15)

### Bug Fixes

* escaping regex ([e1bea79](e1bea79))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))

### Features

* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([#10](#10)) ([71b535f](71b535f))
@GabrielCastro
Copy link
Contributor

🎉 This PR is included in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to boxcee/semantic-release-jira that referenced this pull request Sep 2, 2021
# 1.0.0 (2021-09-02)

### Bug Fixes

* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* First version ([a325b40](a325b40))
* First version ([55491f6](55491f6))
* First version ([5276152](5276152))
* First version ([993ea98](993ea98))
* First version ([dd714cf](dd714cf))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* **security:** Merge pull request [UpHabit#42](https://github.com/boxcee/semantic-release-jira-releases/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))
* **version:** Release init version ([b7d5168](b7d5168))
* [FIX-123] typescript config ([72159d8](72159d8))
* escaping regex ([e1bea79](e1bea79))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* Merge pull request [UpHabit#20](https://github.com/boxcee/semantic-release-jira-releases/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([UpHabit#10](https://github.com/boxcee/semantic-release-jira-releases/issues/10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([UpHabit#9](https://github.com/boxcee/semantic-release-jira-releases/issues/9)) ([6d8637b](6d8637b))
github-actions bot pushed a commit to boxcee/semantic-release-jira that referenced this pull request Sep 2, 2021
# 1.0.0 (2021-09-02)

### Bug Fixes

* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* First version ([25ffcd6](25ffcd6))
* First version ([f5557ff](f5557ff))
* First version ([a325b40](a325b40))
* First version ([55491f6](55491f6))
* First version ([5276152](5276152))
* First version ([993ea98](993ea98))
* First version ([dd714cf](dd714cf))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* **security:** Merge pull request [UpHabit#42](https://github.com/boxcee/semantic-release-jira-releases/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **version:** Release init version ([b7d5168](b7d5168))
* Merge pull request [UpHabit#20](https://github.com/boxcee/semantic-release-jira-releases/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))
* escaping regex ([e1bea79](e1bea79))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* [FIX-123] typescript config ([72159d8](72159d8))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([UpHabit#10](https://github.com/boxcee/semantic-release-jira-releases/issues/10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([UpHabit#9](https://github.com/boxcee/semantic-release-jira-releases/issues/9)) ([6d8637b](6d8637b))
github-actions bot pushed a commit to dylanhitt/semantic-release-jira that referenced this pull request Dec 21, 2022
# 1.0.0 (2022-12-21)

### Bug Fixes

* [FIX-123] typescript config ([72159d8](72159d8))
* add message when not run in prerelease branch ([ddeefc1](ddeefc1))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* do not fail when board or sprint not found, log out the error though ([bbcc017](bbcc017))
* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* escaping regex ([e1bea79](e1bea79))
* First version ([7b29389](7b29389))
* First version ([bcca7ba](bcca7ba))
* First version ([30071f1](30071f1))
* First version ([2fc24a7](2fc24a7))
* First version ([783d80f](783d80f))
* First version ([25ffcd6](25ffcd6))
* First version ([f5557ff](f5557ff))
* First version ([a325b40](a325b40))
* First version ([55491f6](55491f6))
* First version ([5276152](5276152))
* First version ([993ea98](993ea98))
* First version ([dd714cf](dd714cf))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* Merge pull request [UpHabit#20](https://github.com/dylanhitt/semantic-release-jira/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))
* **security:** Merge pull request [UpHabit#42](https://github.com/dylanhitt/semantic-release-jira/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))
* **version:** Release init version ([b7d5168](b7d5168))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add option to not run on prerelease branches ([37fa1fc](37fa1fc))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([UpHabit#10](https://github.com/dylanhitt/semantic-release-jira/issues/10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* Allow usage of board/active sprint for start date of release ([c728311](c728311))
* Always release when on release branch, enable use of env variables in release templates ([3d6d1f0](3d6d1f0))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([UpHabit#9](https://github.com/dylanhitt/semantic-release-jira/issues/9)) ([6d8637b](6d8637b))
* remove requirement for releaseNameTemplate to include ([9d09539](9d09539))
github-actions bot referenced this pull request in jamesbuddrige/semantic-release-jira Mar 6, 2024
# 1.0.0-prerelease.1 (2024-03-06)

### Bug Fixes

* [FIX-123] typescript config ([72159d8](72159d8))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* escaping regex ([e1bea79](e1bea79))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* Merge pull request [UpHabit#20](https://github.com/jamesbuddrige/semantic-release-jira/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))
* **security:** Merge pull request [UpHabit#42](https://github.com/jamesbuddrige/semantic-release-jira/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))
* skip if no tickets found ([ee9de19](ee9de19))
* support the Jira.js library for communicating with Jira ([6e00461](6e00461))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([#10](#10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([#9](#9)) ([6d8637b](6d8637b))
github-actions bot referenced this pull request in jamesbuddrige/semantic-release-jira Mar 6, 2024
# 1.0.0 (2024-03-06)

### Bug Fixes

* [FIX-123] typescript config ([72159d8](72159d8))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* escaping regex ([e1bea79](e1bea79))
* fix build errors, fix editIssueFixVersions, downgrade TS ([1ef08ab](1ef08ab))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* Merge pull request [UpHabit#20](https://github.com/jamesbuddrige/semantic-release-jira/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))
* **security:** Merge pull request [UpHabit#42](https://github.com/jamesbuddrige/semantic-release-jira/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))
* skip if no tickets found ([ee9de19](ee9de19))
* support the Jira.js library for communicating with Jira ([6e00461](6e00461))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([#10](#10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([#9](#9)) ([6d8637b](6d8637b))
github-actions bot referenced this pull request in aechweeks/semantic-release-jira-releases-modern Nov 26, 2024
# 1.0.0 (2024-11-26)

### Bug Fixes

* [FIX-123] typescript config ([72159d8](72159d8))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* escaping regex ([e1bea79](e1bea79))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* Merge pull request [UpHabit#20](https://github.com/aechweeks/semantic-release-jira-releases-modern/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))
* **security:** Merge pull request [UpHabit#42](https://github.com/aechweeks/semantic-release-jira-releases-modern/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding proper release ([2817653](2817653))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([#10](#10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([#9](#9)) ([6d8637b](6d8637b))
* doing a basic upgrade ([bab0db5](bab0db5))
* final testing ([9bef053](9bef053))
* make it release well ([1faf9b5](1faf9b5))
* make it release well ([51dd89f](51dd89f))
* make it release well ([9008de2](9008de2))
* move to non-deprecated package ([a0c2711](a0c2711))
github-actions bot referenced this pull request in davidspek/semantic-release-jira-releases-modern Dec 31, 2024
# 1.0.0 (2024-12-31)

### Bug Fixes

* [FIX-123] typescript config ([72159d8](72159d8))
* **ci:** Automate npm publish ([5abd275](5abd275))
* **ci:** make sure we can compile as a test ([05b883d](05b883d))
* **ci:** make sure we can compile as a test ([542429b](542429b))
* **ci:** remove extra unneeded dependency ([887f522](887f522))
* correct permissions ([c1326a3](c1326a3))
* **deps:** add missing tslib dep ([8b59b2c](8b59b2c))
* **deps:** upgrade jira-connector to 3.1.0 ([3d157d5](3d157d5))
* error when releaseDescriptionTemplate is undefined ([17dca0c](17dca0c))
* escaping regex ([e1bea79](e1bea79))
* fixing ticketRegex matching ([7a3957d](7a3957d))
* Merge pull request [UpHabit#20](https://github.com/davidspek/semantic-release-jira-releases-modern/issues/20) from UpHabit/renovate/major-semantic-release-monorepo ([d758907](d758907))
* **security:** Merge pull request [UpHabit#42](https://github.com/davidspek/semantic-release-jira-releases-modern/issues/42) from UpHabit/dependabot/npm_and_yarn/lodash-4.17.19 ([07a32d9](07a32d9))
* **security:** update all packages with secuirty issues ([1ba6780](1ba6780))
* update yarn lock ([098d972](098d972))
* use correct gh token + add permissions ([2f8a23c](2f8a23c))

### Features

* [UH-1258] better logging ([85a74e9](85a74e9))
* [UH-1258] Implement release creation ([c44e1aa](c44e1aa))
* add config for release description ([cd25e0d](cd25e0d))
* add option for released and releaseDate for veresion ([879d592](879d592))
* add release notes to JIRA release ([e7ce86b](e7ce86b))
* adding branch filtering ([0db1a11](0db1a11))
* adding proper release ([2817653](2817653))
* adding support for regex in tickets ([8cef9b0](8cef9b0))
* adding the ability to pass a regex to filter tickets ([aechweeks#10](https://github.com/davidspek/semantic-release-jira-releases-modern/issues/10)) ([71b535f](71b535f))
* allow multiple tickets in the same commit message ([aff41a2](aff41a2))
* bulk update issues and network concurrency limit ([2bebfd4](2bebfd4))
* **deps:** lodash vunerability ([96addad](96addad))
* **deps:** lodash vunerability ([aechweeks#9](https://github.com/davidspek/semantic-release-jira-releases-modern/issues/9)) ([6d8637b](6d8637b))
* doing a basic upgrade ([bab0db5](bab0db5))
* final testing ([9bef053](9bef053))
* make it release well ([1faf9b5](1faf9b5))
* make it release well ([51dd89f](51dd89f))
* make it release well ([9008de2](9008de2))
* move to non-deprecated package ([a0c2711](a0c2711))
* rename package ([941da50](941da50))
* update build and release\ ([a1ef913](a1ef913))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants