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

add BBC fork and update PR support #2

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

byott
Copy link
Collaborator

@byott byott commented May 2, 2024

  • Add support for Update PR and Fork Repo in Bitbucket Cloud
  • Add default reviewers when creating PR
  • Note that Forking into a specific BBC project is not supported due to how the multi-gitter interfaces and parameters are set up.

@byott byott requested review from gcase555 and ngandhi64 May 2, 2024 21:43
prOptions := &bitbucket.PullRequestsOptions{
Owner: bbc.workspaces[0],
Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks for formatting this

@@ -78,8 +87,34 @@ func (bbc *BitbucketCloud) CreatePullRequest(ctx context.Context, repo scm.Repos
}

func (bbc *BitbucketCloud) UpdatePullRequest(ctx context.Context, repo scm.Repository, pullReq scm.PullRequest, updatedPR scm.NewPullRequest) (scm.PullRequest, error) {
//TODO implement me
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this comment and panic have to go?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's removed on my side, is the diff showing up as included?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, on refresh I can see it, something was with my UI it seems like (it was showing as unchanged still), your good

Copy link
Collaborator

@ngandhi64 ngandhi64 left a comment

Choose a reason for hiding this comment

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

Changes are looking good overall. Left a minor comment.

}
defaultReviewers, _ := bbc.bbClient.Repositories.Repository.ListDefaultReviewers(repoOptions)
for _, reviewer := range defaultReviewers.DefaultReviewers {
newPR.Reviewers = append(newPR.Reviewers, reviewer.Uuid)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tried testing with no default reviewers on repo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup - I tried just tested it and confirmed it works. Tried create PR with no default reviewers, PR was created successfully with no reviewers on it

@byott byott merged commit 3340226 into master May 3, 2024
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.

3 participants