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

Extend regex to match bitbucket merge commit message #656

Merged
merged 4 commits into from
May 27, 2021
Merged

Extend regex to match bitbucket merge commit message #656

merged 4 commits into from
May 27, 2021

Conversation

albertpuente
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Merge commits produce messages which, by default, should match the regexp specified in mergedBranch (called by org.ods.services.GitService.mergedIssueId) which is used to automatically retrieve the issue Id from the message. However, the message Bitbucket produces by default does not match the expected format.

Example of a matching message in previously seen merge commits:

Merge pull request #123 in PROJECT/repo-name from feature/ISSUE-456 to master

* commit '...':

Example of a current non matching message created by Bitbucket in a merge commit:

Pull request #123: abcde

Merge in PROJECT/repo-name from feature/ISSUE-456 to master

* commit '...':

The matching group is the branch name feature/ISSUE-456.

This issue has been found when following the "cleanup preview resources" part of the documentation, and uses the newer context property gitCommitRawMessage introduced after #587.

Describe the solution you'd like
The regexp has been extended to include the new format (preserving backwards compatibility).

@michaelsauter michaelsauter self-requested a review May 27, 2021 08:23
michaelsauter
michaelsauter previously approved these changes May 27, 2021
@michaelsauter michaelsauter merged commit de05d8d into opendevstack:master May 27, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants