Skip to content

Investigate commit field serialization in pipeline trigger requests#49

Closed
Copilot wants to merge 1 commit intorelease/0.17.4from
copilot/sub-pr-46-another-one
Closed

Investigate commit field serialization in pipeline trigger requests#49
Copilot wants to merge 1 commit intorelease/0.17.4from
copilot/sub-pr-46-another-one

Conversation

Copy link

Copilot AI commented Feb 9, 2026

The review comment raised concerns that ReferenceTarget.Commit serializes with empty fields when --commit is not provided, potentially creating invalid API payloads.

Investigation

Verified current behavior: when triggering without --commit, the request includes:

"commit": {
  "type": "commit",
  "hash": ""
}

This occurs because:

  • Commit field is a non-pointer struct without omitempty
  • CommitReference.MarshalJSON() always sets type: "commit" regardless of hash value

Clarification Requested

@gildas stated "the commit is never empty" - asked for clarification on whether:

  1. Bitbucket API accepts empty hash and defaults to branch HEAD
  2. CLI should fetch branch HEAD commit before sending
  3. Field should be omitted entirely with omitempty

No code changes made pending clarification of intended behavior.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI mentioned this pull request Feb 9, 2026
Copilot AI changed the title [WIP] Fix empty commit issue in release/0.17.4 merge request Investigate commit field serialization in pipeline trigger requests Feb 9, 2026
Copilot AI requested a review from gildas February 9, 2026 00:14
@gildas gildas closed this Feb 9, 2026
@gildas gildas deleted the copilot/sub-pr-46-another-one branch February 9, 2026 00:16
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.

2 participants