Repository navigation
Report Bitbucket issues as unsupported now that the tracker is gone - #237
Open
NopeCharon wants to merge 2 commits into
Open
NopeCharon wants to merge 2 commits into
NopeCharon wants to merge 2 commits into
Conversation
Bitbucket stopped returning username for users in 2019. User objects now
carry nickname, which Bitbucket recommends in its place, display_name and
uuid, and only team accounts still have a username. The backend read
nothing else, so pull request authors and reviewers, comment authors,
review authors and repository owners came back empty.
Users are now decoded into one shared bbUser type. convertBitbucketUser
uses the username where Bitbucket still returns one and the nickname
otherwise, and fills Name from display_name, which was never set before.
Pull requests, comments, review participants and GetAuthenticatedUser
all go through it.
RequestReviewers and RemoveReviewers sent the pull request's existing
reviewers back as {"username": ""}, the only identity they could read.
They now send them by uuid, which is how Bitbucket's API identifies
reviewers, and match names to add or remove against each reviewer's
nickname or UUID. A name written as a braced UUID is sent as uuid when
creating or updating a pull request or requesting reviewers; anything
else is still sent as a username.
Repository.Owner came from owner.username, which is empty for
repositories owned by users and, for teams, can differ from the
workspace slug that repository paths take (tutorials/markdowndemo
reported "tutorials-team"). It is now the workspace slug from full_name,
the same way convertBitbucketPR fills Head.Fork.Owner.
New replay tests recorded from api.bitbucket.org check pull request and
review logins against real responses, and TestReplayGetRepo now expects
the workspace slug. The README notes how Bitbucket logins, reviewers and
owners map.
Fixes git-pkgs#232
Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
Bitbucket Cloud removed its native issue tracker in August 2026, and the API endpoints behind it now answer 410 Gone (CHANGE-3071). The backend still called them for every IssueService method, so forge issue commands on bitbucket.org failed with the raw HTTP 410 error and its JSON body, and library callers got an HTTPError they couldn't tell apart from a failed request. The issue service now returns ErrNotSupported without sending a request, as Labels() and Milestones() already do, and the issue types and converters that nothing can reach any more are gone. The comment types and converter that the pull request service shares move from issues.go to comments.go unchanged. Issues().ListURL and Labels().ListURL pointed at the repository's /issues page, which went with the tracker and now 404s, so they return the repository page instead, as the Gerrit backend does. The read-only test uses pull request creation as its example write now that issue creation sends nothing, and the README says that Bitbucket issue operations aren't supported. Fixes git-pkgs#236 Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Summary
Fixes #236.
Stacked on #233. Both PRs touch the Bitbucket issue-comment test, so this branch starts from #233 to avoid a conflict. The first commit is #233's. Only 2d309f9 is new, and the diff will drop to that commit once #233 merges. I also checked that this branch and #235, which is stacked on #233 as well, merge together cleanly and pass
go test ./bitbucket.Bitbucket Cloud removed its native issue tracker in August 2026. The API changelog entry of 20 August 2026 (CHANGE-3071) says its endpoints "are now fully removed", and they answer
410 Gone. The Bitbucket backend still called them, soforge issue list/view/create/... on bitbucket.org failed with the raw HTTP 410 and its JSON body. Library callers got a*forges.HTTPError, soerrors.Is(err, forges.ErrNotSupported)was false.Changes
Issues()returnsErrNotSupportedfrom every method without sending a request, asLabels()andMilestones()already do on Bitbucket. The issue types, converters andstateOpen/stateClosedconstants are deleted, since nothing can reach them any more.bbComment,bbCommentsResponseandconvertBitbucketCommentare still used by pull request comments. They move unchanged fromissues.goto a newcomments.go.Issues().ListURLandLabels().ListURLpointed at<repo>/issues, which now 404s on bitbucket.org. They return the repository page instead, as the Gerrit backend does. That affectsforge issue list --web,forge label list --webandforge browse --issues.forge comment Nalready falls back to the pull request when commenting on an issue fails. It now skips the request that was answered with 410.TestBitbucketReadOnlyHTTPClientused issue creation as its example write. It now uses pull request creation, which still sends a request for the read-only transport to refuse.Repository.HasIssuesstill reflects the repository'shas_issuesflag, which the API keeps returning. I left it as the API reports it rather than override the field.Testing
TestBitbucketIssuesNotSupportedcalls everyIssueServicemethod throughbitbucket.Newagainst a server that fails the test on any request. Each one returnsErrNotSupported.ListURLs return the repository page.go test ./...,go test -race ./bitbucket,golangci-lint run ./bitbucket/...and thejs/wasmbuild of./bitbucketpass.