Skip to content

Fix AnnotatedPullRequest inner PR nil for new changesets

Administrator requested to merge es/fix-bbc-apply into main

Created by: eseliger

When an unpublished changeset is loaded, the inner PullRequest is nil since the metadata is just {}. This causes a nil panic on apply for a changeset on bitbucket cloud when we update it by reapplying.

See this go playground showing how this works and where it falls apart: https://go.dev/play/p/PrPIQRYSoux.

Test plan

Verified that no panic is observed anymore.

Merge request reports

Loading