Skip to content

Synced notebooks: write-back to git #157

Description

@0x0f0f0f

First proposal I had in mind, to replicate our workflow at github.com/rel-int

Idea is to have an "Open PR" button, configured via GitHub App (with a credential-less CI-pull mode)

docs/syncing.md lists write-back as planned. What are your ideas there?

What I had in mind:

  1. Capture teardown/save edits as proposal versions: ordinary immutable versions/{vid}/ records with session origin, never referenced by source.json, exempt from pruning. One policy field, one branch in captureSession, a prune exemption.

  2. "Open PR" button via GitHub App. POST .../notebooks/{id}/pull-requests turns a proposal version into a branch + PR via a registered GitHub App. Branch is based on the session's recorded GitSource.commit so git owns the conflict resolution and merging triggers the existing push sync and the pointer advances.

  3. CI-pull mode. For "no git credentials on the server" one can GET {sync_url}/pending + GET {sync_url}/pending/{vid}/archive + POST …/resolve behind the existing sync-token middleware on a cron-jobbed CI action so the repo CI collects proposals and opens the PR.

Let me know if you had anything in mind! This would be a killer feature

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions