Skip to content

Support for Team Foundation Server merge messages #1378

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

Closed
wants to merge 7 commits into from
Closed

Support for Team Foundation Server merge messages #1378

wants to merge 7 commits into from

Conversation

joergmetzler
Copy link
Contributor

@joergmetzler joergmetzler 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?

@asbjornu
Copy link
Member

asbjornu 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
Copy link
Contributor Author

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
Copy link
Contributor

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

@asbjornu
Copy link
Member

@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.

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.

4 participants