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

chore(bitbucket): send rr.author.id with PR author UUID. #2018

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cloud/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ type (
Author struct {
Login string `json:"login"`
AvatarURL string `json:"avatar_url,omitempty"`
ID string `json:"id,omitempty"`
}

// Reviewer is the user's reviewer of a Pull/Merge Request.
Expand Down
2 changes: 1 addition & 1 deletion cmd/terramate/cli/bitbucket/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (c *Client) GetPullRequestsByCommit(ctx context.Context, commit string) (pr
"rendered",
"summary",
"state",
"author",
"author.*",
"source.branch.name",
"source.commit.hash",
"destination.branch.name",
Expand Down
3 changes: 2 additions & 1 deletion cmd/terramate/cli/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ func (c *cli) newBitbucketReviewRequest(pr *bitbucket.PR) *cloud.ReviewRequest {
}

// TODO(i4k): Bitbucket does not provide a final review decision from the API but we
// can infer it from the reviewers + participants fields.
// can infer it from the reviewers + participants fields.
reviewDecision := ""
if len(pr.Reviewers) > 0 {
reviewDecision = "review_required"
Expand All @@ -1105,6 +1105,7 @@ func (c *cli) newBitbucketReviewRequest(pr *bitbucket.PR) *cloud.ReviewRequest {
Status: pr.State,
Author: cloud.Author{
Login: pr.Author.DisplayName,
ID: pr.Author.UUID,
AvatarURL: avatarURL,
},
Branch: c.cloud.run.metadata.BitbucketPipelinesBranch,
Expand Down
Loading