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

Support for Team Foundation Server merge messages #1378

Conversation

@joergmetzler
Copy link
Contributor

commented Feb 23, 2018

I added support for the default merge messages for pull request in Team Foundation Server 2017.
The bad news:
If there is only one commit in the pull request, the TFS will copy the commit message into the merge message and will not use the default commit message.
Any ideas for this problem?

joergmetzler and others added 2 commits Feb 23, 2018
@asbjornu

This comment has been minimized.

Copy link
Member

commented Mar 9, 2018

@JakeGinnivan, @gep13: Why are we detecting merge messages to deduce whether a commit is a merge or not? Shouldn't this be a simple parents.Count > 1 check?

@GitTools GitTools deleted a comment from joergmetzler Mar 9, 2018
@joergmetzler

This comment has been minimized.

Copy link
Contributor Author

commented Mar 9, 2018

If the master branch only accept pull requests and an automatic build starts on every commit, then then the version is incremented wrong because of a missing tag. The version tag is added later e.g. due to git version release finish. The release branch may be deleted when the pull request is accepted.
So the version is extracted from the merge message as a workaround.
Think it is not a good behavior.

In the meantime we changed the build trigger on the master to /ref/tags/* so that the build is triggered as soon as the tag is pushed and not before.
Works perfectly for all of our repos and we don't need to rely on the merge messages.

But if someone needs/wants to use the merg messages, you are free to accept the pull request.

@JakeGinnivan

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2018

@asbjornu we extract the version from the merge message I think

@asbjornu

This comment has been minimized.

Copy link
Member

commented Mar 10, 2018

@JakeGinnivan: Ah, I see. But I think that's an orthogonal issue. Figuring out whether it's a merge-commit or not should be an independent parents.Count check, imho.

@joergmetzler: I think the fix you've added is fine, but if you have ideas on how to improve this behaviour by (among other things) checking for the number of parents (or perhaps LibGit2Sharp exposes merge information out of the box) to detect whether a commit is a merge-commit or not, we would love a pull request for it.

asbjornu added 5 commits Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.