Skip to content

Support branch and tag format for commitChangesFromRepo base#111

Open
bluwy wants to merge 1 commit into
mainfrom
support-git-ref
Open

Support branch and tag format for commitChangesFromRepo base#111
bluwy wants to merge 1 commit into
mainfrom
support-git-ref

Conversation

@bluwy

@bluwy bluwy commented Jun 18, 2026

Copy link
Copy Markdown
Member

So it's the same API as commitFilesFromBase64. No reason to not support either as long as the branch and tag is locally available for diffing.

I also did some small refactor in core.ts to rename oid to sha as discussed before.

Comment thread src/core.ts
Comment on lines -19 to -21
// For explicit commit bases we don't resolve the base oid from a ref,
// but the shared metadata query still expects a valid qualified ref name.
return "HEAD";

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is refactored away as we can avoid accessing info.baseRef in this state.

If base: { commit: "123" } is passed, info.baseRef would be null as it doesn't support direct SHAs. This is fine because we're not going to access it anyways in

const baseSha = "commit" in base ? base.commit : getBaseRefSha(info.baseRef);

@bluwy bluwy mentioned this pull request Jun 18, 2026
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.

1 participant