Skip to content

Commit

Permalink
fix(bitbucket): wrong base_branch sent in deployment. (#2035)
Browse files Browse the repository at this point in the history
## What this PR does / why we need it:

The `BITBUCKET_PR_DESTINATION_BRANCH` environment is only available in
`pull_request` events, so we need to send the data from the PR info in
the `review_request`.

## Which issue(s) this PR fixes:
none

## Special notes for your reviewer:

## Does this PR introduce a user-facing change?
```
yes, fixes a bitbucket issue.
```
  • Loading branch information
i4ki authored Jan 10, 2025
2 parents ffd8680 + 59cc021 commit 1b82bab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the:

## Unreleased

### Fixed

- Fix the sync of `base_branch` information in the Terramate Cloud deployment.

## v0.11.7

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions cmd/terramate/cli/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,8 @@ func (c *cli) newBitbucketReviewRequest(pr *bitbucket.PR) *cloud.ReviewRequest {
Login: pr.Author.DisplayName,
AvatarURL: pr.Author.Links.Avatar.Href,
},
Branch: c.cloud.run.metadata.BitbucketPipelinesBranch,
BaseBranch: c.cloud.run.metadata.BitbucketPipelinesDestinationBranch,
Branch: pr.Source.Branch.Name,
BaseBranch: pr.Destination.Branch.Name,
ChangesRequestedCount: changesRequestedCount,
ApprovedCount: approvalCount,
ReviewDecision: reviewDecision,
Expand Down

0 comments on commit 1b82bab

Please sign in to comment.