Skip to content

Implements getPullRequestForCommit and getAccountForCommit for Azure and Bitbucket#4243

Merged
ramin-t merged 9 commits intomainfrom
4192-get-pr-for-commit
Apr 30, 2025
Merged

Implements getPullRequestForCommit and getAccountForCommit for Azure and Bitbucket#4243
ramin-t merged 9 commits intomainfrom
4192-get-pr-for-commit

Conversation

@sergeibbb
Copy link
Member

@sergeibbb sergeibbb commented Apr 22, 2025

Description

Implements getPullRequestForCommit and getAccountForCommit for Azure and Bitbucket.
Solves #4192

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@sergeibbb sergeibbb linked an issue Apr 22, 2025 that may be closed by this pull request
7 tasks
@sergeibbb sergeibbb force-pushed the 4192-get-pr-for-commit branch from 27e89a7 to 0a19579 Compare April 22, 2025 12:58
sergeibbb added a commit that referenced this pull request Apr 22, 2025
sergeibbb added a commit that referenced this pull request Apr 22, 2025
sergeibbb added a commit that referenced this pull request Apr 22, 2025
sergeibbb added a commit that referenced this pull request Apr 22, 2025
Displays a warning message when Bitbucket PR commit links are unavailable.
This informs the user about the need to install the Bitbucket app for their commits.
(#4192, #4243)
@sergeibbb sergeibbb requested review from eamodio and ramin-t April 22, 2025 13:06
sergeibbb added a commit that referenced this pull request Apr 22, 2025
@d13 d13 self-requested a review April 23, 2025 15:31
Copy link
Contributor

@ramin-t ramin-t left a comment

Choose a reason for hiding this comment

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

Unfortunately, I'm not able to get this to work. I'm getting a bunch of errors with Azure DevOps that say invalid response body...unexpected token <.

Screenshot:

image

But I think it might be some issue with the Azure DevOps integraiton outside of this PR, because it is affecting other calls as well.

Will investigate, and re-test once I've addressed it. In the meantime, here are a few tiny comments.

@d13
Copy link
Member

d13 commented Apr 24, 2025

Unfortunately, I'm not able to get this to work. I'm getting a bunch of errors with Azure DevOps that say invalid response body...unexpected token <.

Screenshot:

image

But I think it might be some issue with the Azure DevOps integraiton outside of this PR, because it is affecting other calls as well.

Will investigate, and re-test once I've addressed it. In the meantime, here are a few tiny comments.

Looks like the response returned HTML instead of JSON

@sergeibbb
Copy link
Member Author

@axosoft-ramint @d13
Thank you! I'll look at it

sergeibbb added a commit that referenced this pull request Apr 25, 2025
@sergeibbb sergeibbb force-pushed the 4192-get-pr-for-commit branch from 74f9920 to e8fdaa5 Compare April 25, 2025 14:47
sergeibbb added a commit that referenced this pull request Apr 25, 2025
sergeibbb added a commit that referenced this pull request Apr 25, 2025
sergeibbb added a commit that referenced this pull request Apr 25, 2025
Displays a warning message when Bitbucket PR commit links are unavailable.
This informs the user about the need to install the Bitbucket app for their commits.
(#4192, #4243)
sergeibbb added a commit that referenced this pull request Apr 25, 2025
sergeibbb added a commit that referenced this pull request Apr 29, 2025
Displays a warning message when Bitbucket PR commit links are unavailable.
This informs the user about the need to install the Bitbucket app for their commits.
(#4192, #4243)
sergeibbb added a commit that referenced this pull request Apr 29, 2025
@sergeibbb
Copy link
Member Author

@axosoft-ramint , @d13

I've fixed the problem. It turned out that ?api-version=7.1 attribute is required for this endpoint.

@sergeibbb sergeibbb requested a review from ramin-t April 29, 2025 08:55
@ramin-t
Copy link
Contributor

ramin-t commented Apr 29, 2025

@sergeibbb On top of your latest changes, I'm still seeing the error everywhere. It is affecting nearly every query with Azure, including getPullRequestForCommit. Logs attached.
GitLens-1.log

@sergeibbb
Copy link
Member Author

@axosoft-ramint

Is Launchpad broken for Azure?

@sergeibbb sergeibbb force-pushed the 4192-get-pr-for-commit branch from 12b3618 to e6242c7 Compare April 30, 2025 13:45
sergeibbb added a commit that referenced this pull request Apr 30, 2025
sergeibbb added a commit that referenced this pull request Apr 30, 2025
sergeibbb added a commit that referenced this pull request Apr 30, 2025
sergeibbb added a commit that referenced this pull request Apr 30, 2025
Displays a warning message when Bitbucket PR commit links are unavailable.
This informs the user about the need to install the Bitbucket app for their commits.
(#4192, #4243)
sergeibbb added a commit that referenced this pull request Apr 30, 2025
@sergeibbb sergeibbb force-pushed the 4192-get-pr-for-commit branch from e6242c7 to 33a89b0 Compare April 30, 2025 14:36
@sergeibbb
Copy link
Member Author

@axosoft-ramint

It might be a clue in azure-devops.ts.

Is your repository on dev.azure.com or is it visualstudio.net?

@sergeibbb
Copy link
Member Author

@axosoft-ramint

Can you please show what URL your repository has for this request on main branch:
image

Copy link
Contributor

@ramin-t ramin-t left a comment

Choose a reason for hiding this comment

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

I am not able to test this because I'm getting errors everywhere with my Azure connection/integration, but that will need to be investigated outside of this PR. Code LGTM - suggest having @d13 test it.

@ramin-t
Copy link
Contributor

ramin-t commented Apr 30, 2025

Going to land this and we can verify in pre-release

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.

Get "associated PR for commit" working on all providers that don't have it

3 participants