-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implements getPullRequestForCommit
and getAccountForCommit
for Azure and Bitbucket
#4243
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
base: main
Are you sure you want to change the base?
Conversation
27e89a7
to
0a19579
Compare
There was a problem hiding this 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:
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.
return { name: raw, email: '' }; | ||
} | ||
|
||
export interface BitbucketCommit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can maybe extend BitbucketBriefCommit
?
'warn', | ||
`GitLens cannot access Bitbucket PRs for commits. | ||
Allow access by visiting [this commit](${revLink}) on Bitbucket and click “Pull requests” under the “Apps” section on the bottom right | ||
or [read our docs](https://help.gitkraken.com/gitlens/gitlens-troubleshooting/#enable-showing-bitbucket-pull-request-for-a-commit) for more info.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page doesn't exist (or, at least, 404s for me). We should make sure it does before merging.
_options?: { | ||
avatarSize?: number; | ||
}, | ||
): Promise<UnidentifiedAuthor | undefined> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we probably want a comment on why we need to use UnidentifiedAuthor
type here even when we find the author, because at a glance it sounds confusing. I'm guessing it's because the API never gives us an id/username we can use, and the more solid types require it?
@@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p | |||
|
|||
### Fixed | |||
|
|||
- Gets "associated PR for commit" working on Bitbucket and Azure DevOps ([#4192](https://github.com/gitkraken/vscode-gitlens/issues/4192)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the changelog represents the user-facing change reflected in the issue, probably more along something like "added support for associated BitBucket, BitBucket Server, and Azure DevOps pull requests on commits" in the "Added" category, or "fixed _______ not appearing on commits" if we want it in the "Fixed" category.
Looks like the response returned HTML instead of JSON |
@axosoft-ramint @d13 |
Description
Implements
getPullRequestForCommit
andgetAccountForCommit
for Azure and Bitbucket.Solves #4192
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses