A CLI for tangled operations.
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add pr update for pull request rounds #3

open opened by onev.cat

Summary#

Add a tang pr update / tang pr resubmit workflow that appends a new round to an existing pull request record after the source branch changes.

Motivation#

Tangled pull requests are patch snapshots: pr create uploads the current branch diff as a gzipped patch blob and stores it in sh.tangled.repo.pull.rounds[0]. Unlike GitHub, pushing new commits to the source branch does not automatically update the pull request record.

This is easy to miss. In PR #3, a follow-up README commit was pushed to the feature branch after the PR record was created, but pr merge merged only the original patch blob. The later branch commit stayed outside main.

Proposed UX#

tang pr update 3
# alias or alternate spelling:
tang pr resubmit 3

The command should:

  • resolve the pull request and its original target/source branches,
  • compare the latest source branch against the target branch through the knot,
  • upload a new gzipped patch blob to the user's PDS,
  • update the existing sh.tangled.repo.pull record with an append-only new rounds[] entry,
  • preserve title/body/source/target metadata,
  • report the new round number.

pr diff, pr checkout, and pr merge should continue to use the latest round.

Follow-ups#

  • Consider warning in pr merge when the source branch appears newer than the latest PR round.
  • Consider tang pr merge --update-first once pr update is reliable.
  • Document that Tangled PRs are round-based snapshots rather than live branch refs.
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:kl2ejrmz5zmxnno3ll4luz76/sh.tangled.repo.issue/3mkv2ljp64422