-
Notifications
You must be signed in to change notification settings - Fork 654
Enable custom merge message formats via configuration #1488
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
Enable custom merge message formats via configuration #1488
Conversation
@asbjornu All synched up and green 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, although I have a tingling sense this steps on other pull requests we've recently merged or that are still open. I can't find them now, though, so I might be wrong. I also have a couple of questions I'd appreciate some feedback on.
@asbjornu I've some time tomorrow to tidy things up as required, then will be AFK for a few days. Let me know what you want to do on the last two points above |
@asbjornu Did you have any further response on the code review? I'll be able to address things this evening. It seems the appveyor build failed for an unrelated reason. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this mostly looks good. But I'm thinking, could perhaps merge-message-formats
replace the entire TFS merge message support that was implemented in #1591?
Absolutely, but you'll have a regression for consumers of that change. They will need to update their configuration to cater for the TFS messages when they update to 5.0 |
Couldn't the TFS merge messages be added as defaults in |
I might be confused... Do you mean adding to the default configuration class itself? I'm not sure I see the benefit. |
Don't worry. If anything, I'm the confused one. 😄 I'm thinking that the |
@asbjornu Anything else to do here? |
@Kieranties, I don't feel we've got the same understanding of the relationship between Think of it this way: If this PR was merged before #1591, could #1591 have looked differently? If so, how? If we're able to describe "how", I would love to have that implemented in this PR. |
@asbjornu if this had been completed before #1591 then the user would be able to add the following to their configuration: merge-message-formats:
TfsMergeMessageEnglishUS: ^Merge (?<SourceBranch>[^\s]*) to (?<TargetBranch>[^\s]*)
TfsMergeMessageGermanDE: ^Zusammengeführter PR ""(?<PullRequestNumber>\d+)""\: (?<SourceBranch>.*) mit (?<TargetBranch>.*) mergen") ... and #1591 would never have been needed. However, as #1591 has already been implemented, the above already exist as defaults in the
|
Ok, thanks for the explanation, @Kieranties. It all makes sense now. Then we only have to decide whether we want to undo the changes introduced in #1591 just to keep the core of GitVersion as simple as possible. How do you feel about that, @joergmetzler? |
I'm fine with that. |
@joergmetzler: Awesome. Can you please effectively revert #1591 then, @Kieranties? I'll be quick to approve and merge after. |
I'll pick this up this evening. You'll need to highlight the regression
though right?
…On Fri, 10 May 2019 at 14:25, Asbjørn Ulsberg ***@***.***> wrote:
Awesome. Can you please effectively revert #1591
<#1591> then, @Kieranties
<https://github.com/Kieranties>? I'll be quick to approve and merge after.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1488 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACVZPZBTZIIR5O4CMGC3E3PUVZVPANCNFSM4FYRALJQ>
.
|
Ah! Just spotted it's a new thing in 5.0 as well. No regression then 👍 |
@asbjornu Good to go! |
Awesome, thank you so much for the great work and patience, @Kieranties! |
NOTE: This PR has is dependent on the breaking changes introduced by #1487 and should not be approved unless the related breaking changes are approved.
This PR enables custom merge message formats to be added via configuration.
I've now used GitVersion on a few build systems but only ran into issues with merge messages when migrating to TFS. TFS merge messages vary depending on if the merge is a PR, has one or more commits, or is customised by the user completing the PR. In many cases, the merge message will be Merged PR 1234: . this sadly does not fit the baked-in messages that come with GitVersion.
Instead of simply adding another entry into the defaults, this PR enables user to add custom messages formats into their configuration.