Skip to content

feat(copy): skip PR body overwrite when already synced from newer commit#20

Merged
EspenAlbert merged 8 commits intomainfrom
task/t07-26-pr-desc-sdlc-commit-check
Feb 13, 2026
Merged

feat(copy): skip PR body overwrite when already synced from newer commit#20
EspenAlbert merged 8 commits intomainfrom
task/t07-26-pr-desc-sdlc-commit-check

Conversation

@EspenAlbert
Copy link
Owner

@EspenAlbert EspenAlbert commented Feb 12, 2026

Summary

  • Embed source commit timestamp as <!-- path-sync: sha=... ts=... --> HTML comment in PR body to track which source state was synced
  • Skip PR body overwrite when existing PR was already synced from an equal or newer source commit
  • Close stale PRs when path-sync copy or dep-update finds zero changes (source and destination already in sync)
  • Add keep_pr_on_no_changes config to prevent auto-closing stale PRs (on both SrcConfig and DepConfig)
  • Add force_resync config to bypass the "PR already synced from newer commit" skip check (on SrcConfig only)

Design decisions

  • Source commit timestamp (src_repo.head.commit.committed_datetime) rather than destination sync commit, because the destination commit is always created during the run and would defeat comparison
  • HTML comment <!-- path-sync: ... --> is invisible in rendered markdown, backward-compatible (missing comment = always overwrite)
  • Keep remote branch on close: next sync reuses the same branch name, no orphan risk
  • Bool flags default to False: keep_pr_on_no_changes and force_resync preserve existing behavior when omitted
  • force_resync only on SrcConfig: dep-update always resets to origin/default and has no timestamp-based skip

@EspenAlbert EspenAlbert changed the title feat: Check PR description for SDLC commit before overwriting feat(copy): skip PR body overwrite when already synced from newer commit Feb 12, 2026
@EspenAlbert EspenAlbert marked this pull request as ready for review February 12, 2026 20:10
@EspenAlbert EspenAlbert merged commit 8f8d007 into main Feb 13, 2026
14 checks passed
@EspenAlbert EspenAlbert deleted the task/t07-26-pr-desc-sdlc-commit-check branch February 13, 2026 07:26
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