Azure Devops support

- Fixes logic error in PullIsMergeable()
- Replace GetRemoteURL() with GetWebURL() - returns what we want
This commit is contained in:
David McPike
2019-04-29 20:19:02 -05:00
parent 36a849d2b5
commit bf1ccc47db
2 changed files with 3 additions and 3 deletions

View File

@@ -876,7 +876,7 @@ func (e *EventParser) ParseAzureDevopsRepo(adRepo *azuredevops.GitRepository) (m
if parent != nil {
owner = parent.GetName()
} else {
uri, err := url.Parse(adRepo.GetRemoteURL())
uri, err := url.Parse(adRepo.GetWebURL())
if err != nil {
return models.Repo{}, err
}

View File

@@ -171,9 +171,9 @@ func (g *AzureDevopsClient) PullIsMergeable(repo models.Repo, pull models.PullRe
}
if *adPull.MergeStatus != azuredevops.MergeConflicts.String() &&
*adPull.MergeStatus != azuredevops.MergeRejectedByPolicy.String() {
return false, nil
return true, nil
}
return true, nil
return false, nil
}
// GetPullRequest returns the pull request.