Conversation
There was a problem hiding this comment.
Pull request overview
Release merge for 0.17.4, updating versioning/packaging metadata, dependencies, and extending pipeline JSON handling to support additional target types (incl. pull request targets).
Changes:
- Bump application/package versions to 0.17.4 (snap, chocolatey, internal VERSION, release metadata).
- Refactor pipeline
targethandling into a polymorphicTargetinterface with JSON type-based unmarshalling; add new target/reference structs and test coverage. - Improve PR reviewer “default” behavior by removing the current user from default reviewers; scope user cache entries by profile.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| version.go | Bumps VERSION constant to 0.17.4. |
| testdata/pipeline.json | Updates repository UUID and avatar URL in pipeline fixture. |
| testdata/pipeline-pullrequest.json | Adds new fixture for pipelines targeting pull requests. |
| packaging/snap/snapcraft.yaml | Updates snap package version to 0.17.4. |
| packaging/package-description.xml | Adds 0.17.4 release entry. |
| packaging/chocolatey/tools/chocolateyinstall.ps1 | Updates Chocolatey artifact filename/checksum fields for 0.17.4. |
| packaging/chocolatey/bitbucket-cli.nuspec | Updates Chocolatey nuspec version and release notes. |
| go.mod | Updates dependencies (notably go-logger) and bumps several indirects. |
| go.sum | Syncs sums for updated dependencies. |
| cmd/user/user.go | Makes user cache keys profile-scoped for me and UUID lookups. |
| cmd/repository/repository.go | Marks Parent as omitempty in JSON. |
| cmd/pullrequest/update.go | When adding “default” reviewers, resolves current user and filters them out. |
| cmd/pullrequest/pullrequest_reference.go | Adds a lightweight pull request reference struct for pipeline targets. |
| cmd/pullrequest/create.go | Filters current user out of default reviewers on PR creation. |
| cmd/pipeline/trigger.go | Migrates trigger payload to new reference target fields/types. |
| cmd/pipeline/target_reference.go | Adds ReferenceTarget implementation and registers it for polymorphic decoding. |
| cmd/pipeline/target_pullrequest_reference.go | Adds pull-request target implementation and registers it. |
| cmd/pipeline/target.go | Replaces concrete Target struct with interface + type-registry based unmarshal helper. |
| cmd/pipeline/pipeline_test.go | Updates tests for new target polymorphism; adds PR-target unmarshalling test. |
| cmd/pipeline/pipeline.go | Updates sorting/row building and unmarshalling to use polymorphic targets. |
| cmd/common/selector.go | Introduces shared Selector type used by multiple target types. |
| cmd/commit/commit.go | Marks commit Parents as omitempty. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if len(triggerOptions.Commit) > 0 { | ||
| target.Commit = &commit.Commit{Hash: triggerOptions.Commit} | ||
| target.Commit = commit.CommitReference{Hash: triggerOptions.Commit} | ||
| } |
There was a problem hiding this comment.
When --commit is not provided, ReferenceTarget.Commit remains the zero value, but because Commit is a non-pointer and not omitempty, the trigger payload will still serialize a commit object with an empty hash (via CommitReference.MarshalJSON). This is likely to produce an invalid Bitbucket API request. Consider omitting commit when unset (e.g., adjust ReferenceTarget.MarshalJSON to include commit only when Commit.Hash != "", or make Commit a pointer with omitempty), or populate it from the current HEAD when no --commit flag is given.
Release 0.17.4. Do not delete the release branch after the merge.