Skip to content

feat(cursor-origin): Create branches and commits - #141

Merged
wedamija merged 2 commits into
mainfrom
danf/origin-provider-commit-writes
Sep 24, 2026
Merged

wedamija merged 2 commits into
mainfrom
danf/origin-provider-commit-writes

Conversation

@wedamija

Copy link
Copy Markdown
Member

Add create_branch, delete_branch, and create_commit.

Origin only commits to the branch head, so each commit is a compare-and-swap and branches cannot be forced. Creating an existing branch returns a conflict, and a failed commit removes the branch created for it.

Commits without an author use the app as the author, since Origin requires one.

Stacked on #137.

@wedamija
wedamija requested a review from a team as a code owner September 23, 2026 23:34
Comment thread src/scm/providers/cursor_origin/provider.py
@wedamija
wedamija force-pushed the danf/origin-provider-contents branch from 0aa21da to 1e8a67e Compare September 24, 2026 18:14
@wedamija
wedamija force-pushed the danf/origin-provider-commit-writes branch from 274b4e0 to 766affb Compare September 24, 2026 18:14
Comment thread src/scm/providers/cursor_origin/provider.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 766affb. Configure here.

Comment thread src/scm/providers/cursor_origin/provider.py
@wedamija
wedamija changed the base branch from danf/origin-provider-contents to main September 24, 2026 18:26
@wedamija
wedamija force-pushed the danf/origin-provider-commit-writes branch from 766affb to 79ecb6a Compare September 24, 2026 18:28
Comment thread src/scm/providers/cursor_origin/provider.py Outdated
@wedamija
wedamija force-pushed the danf/origin-provider-commit-writes branch from 79ecb6a to cb276c5 Compare September 24, 2026 18:34
Add `create_branch`, `delete_branch`, and `create_commit`.

Origin only commits to the branch head, so each commit is a compare-and-swap and branches cannot be forced. Creating an existing branch returns a conflict, and a failed commit removes the branch created for it.

Commits without an author use the app as the author, since Origin requires one.
@wedamija
wedamija force-pushed the danf/origin-provider-commit-writes branch from cb276c5 to 729085b Compare September 24, 2026 18:37
create_commit deletes the branch it created when the commit fails. A
gateway timeout can hide a commit that landed, and Origin lets a second
writer create the same branch, so delete it only while it still points
at the parent commit.
@wedamija
wedamija merged commit 7beeacb into main Sep 24, 2026
12 of 13 checks passed
@wedamija
wedamija deleted the danf/origin-provider-commit-writes branch September 24, 2026 18:43
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