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

Fix issue with pullrequests in Azure DevOps #3181

Conversation

enriqueraso
Copy link
Contributor

@enriqueraso enriqueraso commented Aug 29, 2022

Fix issue with PullRequests in Azure DevOps. PullRequest not well detected and Remotes not well replaced.

Description

It detects correctly when a reference name is a PullRequest and also remove Remotes properly on a PullRequest.
Helps on Azure DevOps PullRequest completion. Otherwise it doesn't inherit semver calculated on source branch.

Related Issue

Fix #3180

Motivation and Context

I want to use GitVersion in Azure DevOps with the gitversion.yml described in the bug.

How Has This Been Tested?

I tested it on Azure DevOps adding binaries to the repo and change yml file.

Screenshots:

image

image

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@arturcic
Copy link
Member

@enriqueraso can you update the tests to cover the additional prefixes you added?

public class PullRequestInBuildAgentTest

@enriqueraso
Copy link
Contributor Author

@arturcic Indeed, I will update it. :)

@enriqueraso
Copy link
Contributor Author

@arturcic additional prefixes were added as well a new unit test.

@arturcic arturcic modified the milestone: 6.x Aug 29, 2022
@arturcic
Copy link
Member

@enriqueraso, I think if you want to have this included in the next release, better rebase this PR on support/5.x branch. Please include only your commits on top

Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

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

Please re-target and rebase on support/5.x. Besides a few comments, I think this looks good!

src/GitVersion.Core/Git/ReferenceName.cs Outdated Show resolved Hide resolved
src/GitVersion.Core/Git/ReferenceName.cs Outdated Show resolved Hide resolved
@enriqueraso enriqueraso force-pushed the bug/inherit-fail-on-azure-pullrequest branch from 0d0d0c4 to 5ab3420 Compare August 30, 2022 07:34
@enriqueraso enriqueraso changed the base branch from main to support/5.x August 30, 2022 07:35
@enriqueraso enriqueraso changed the base branch from support/5.x to main August 30, 2022 07:38
@enriqueraso enriqueraso force-pushed the bug/inherit-fail-on-azure-pullrequest branch from 100b53d to 4b18753 Compare August 30, 2022 07:45
@enriqueraso enriqueraso changed the base branch from main to support/5.x August 30, 2022 07:46
Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

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

Beautiful! 😍

@asbjornu asbjornu merged commit 3b6a100 into GitTools:support/5.x Sep 1, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 1, 2022

Thank you @enriqueraso for your contribution!

@enriqueraso
Copy link
Contributor Author

@asbjornu, @arturcic any date for the new NuGet package from support/5.x?

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.

[Bug] Don't inherit semver on an Azure DevOps PullRequest
3 participants