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

azureGetMergeRequestsApi likely returns nothing #142

Open
officeSpacePirate opened this issue Apr 13, 2024 · 0 comments
Open

azureGetMergeRequestsApi likely returns nothing #142

officeSpacePirate opened this issue Apr 13, 2024 · 0 comments

Comments

@officeSpacePirate
Copy link

I am attempting to use this extension for Coverity Connect in Azure DevOps and when enabling bridge_coverity_automation_prComment, the extension is never able to find a PR. I believe I have figured out a better way to retrieve this data without affecting the interface:

  1. In azure-service-client.ts on line 10, the string could be changed to /{0}/{1}/_apis/git/repositories/{2}/pullrequests/{3}?api-version={4}
  2. Then starting on line 24, change to
      const endpoint = StringFormat(
        azureData.api.url.concat(this.azureGetMergeRequestsAPI),
        azureData.organization.name,
        azureData.project.name,
        azureData.repository.name,
        azureData.repository.pull,
        this.apiVersion
  1. Add appropriate handling for when azureData.repository.pull == null; perhaps a log that tells the user it's required.

An alternative that would take more refactoring, but perhaps be simpler, would be to add the additional parameters supported by the Bridge CLI for Azure DevOps: SCM Information needed for “Adding Comments to Pull Requests” feature

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

No branches or pull requests

1 participant