Merge VSTS CI source into Azure Pipelines CI source; add local support for VSTS request source#1416
Merged
orta merged 10 commits intoJan 28, 2023
Conversation
Member
|
Perfect, PR looks great to me, needed a few reads before I was certain on it 👍🏻 Nice work, and well explained |
Member
|
Shipped as 9.2.0 |
Contributor
Author
|
Thanks! Yeah, it's a little bit to take in at once, but my team really appreciates the work that y'all have put into Danger and wanted to contribute back a bit since we've been using it in the Azure DevOps environment. I appreciate the quick review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR provides cleanup and bugfix/enhancement work aimed at improving the level of support for Azure Pipelines. Changes include:
Merging
ci_source/vsts.rbintoci_source/azure_pipelines.rb, combining their functionality as appropriate. As was noted as a p.s. on Fix run with Azure Pipelines as CI Source and Azure Repos Git as Request Source #1284, Azure DevOps (which contains Azure Pipelines) is the new name for what used to be Visual Studio Team Services, so these two CI sources were providing two partial implementations for what's actually one CI platform. With this change,azure_pipelines.rbprovides a unified implementation which should support running on Azure DevOps pipelines, with repositories hosted in Azure Devops or elsewhere.Making the changes necessary to support the VSTS request source from a local repository, via
danger pr {pr_url}. By settingDANGER_VSTS_API_TOKENandDANGER_VSTS_HOST, users can now test against an Azure DevOps pull request locally.Worth noting is that while the VSTS request_source would likely be more appropriately renamed to "AzureGit" or something similar, I held off on making this change only because
DANGER_VSTS_API_TOKENandDANGER_VSTS_HOSTreference the "VSTS" nomenclature, and I didn't want to cause a breaking change.