From c9890005a05bffd594543ec9ab22a2b061450123 Mon Sep 17 00:00:00 2001 From: Espen Albert Date: Fri, 13 Feb 2026 10:38:37 +0000 Subject: [PATCH 1/3] fix(copy): skip PR close when running with --local/--skip-commit --- path_sync/_internal/cmd_copy.py | 2 +- path_sync/cmd_copy_test.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/path_sync/_internal/cmd_copy.py b/path_sync/_internal/cmd_copy.py index c251a42..cfa3e27 100644 --- a/path_sync/_internal/cmd_copy.py +++ b/path_sync/_internal/cmd_copy.py @@ -221,7 +221,7 @@ def _run_copy(config: SrcConfig, src_root: Path, dest_filter: str, opts: CopyOpt def _close_stale_pr(dest_root: Path, copy_branch: str, opts: CopyOptions, config: SrcConfig) -> None: - if opts.dry_run or opts.no_pr or config.keep_pr_on_no_changes: + if opts.dry_run or opts.skip_commit or opts.no_pr or config.keep_pr_on_no_changes: return if git_ops.has_open_pr(dest_root, copy_branch): git_ops.close_pr(dest_root, copy_branch, "Closing: source and destination are in sync, no changes needed") diff --git a/path_sync/cmd_copy_test.py b/path_sync/cmd_copy_test.py index 7e92303..ea8c258 100644 --- a/path_sync/cmd_copy_test.py +++ b/path_sync/cmd_copy_test.py @@ -552,6 +552,14 @@ def test_close_stale_pr_skipped_when_keep_pr_on_no_changes(tmp_path: Path): mock_git.has_open_pr.assert_not_called() +def test_close_stale_pr_skipped_when_skip_commit(tmp_path: Path): + opts = CopyOptions(skip_commit=True) + config = _make_src_config() + with patch(f"{COPY_MODULE}.git_ops") as mock_git: + _close_stale_pr(tmp_path, "sync/test", opts, config) + mock_git.has_open_pr.assert_not_called() + + def test_close_stale_pr_runs_by_default(tmp_path: Path): opts = CopyOptions() config = _make_src_config() From c08521cce5038a3c4ac0f9f6fb6a54eca19e4207 Mon Sep 17 00:00:00 2001 From: Espen Albert Date: Fri, 13 Feb 2026 10:39:40 +0000 Subject: [PATCH 2/3] chore: regen --- .changelog/000.yaml | 7 +++++++ docs/copy/index.md | 1 + 2 files changed, 8 insertions(+) create mode 100644 .changelog/000.yaml diff --git a/.changelog/000.yaml b/.changelog/000.yaml new file mode 100644 index 0000000..4792637 --- /dev/null +++ b/.changelog/000.yaml @@ -0,0 +1,7 @@ +name: copy +ts: 2026-02-13 10:39:28.526332+00:00 +type: fix +author: Espen Albert +changelog_message: 'fix(copy): skip PR close when running with --local/--skip-commit' +message: 'fix(copy): skip PR close when running with --local/--skip-commit' +short_sha: c98900 diff --git a/docs/copy/index.md b/docs/copy/index.md index 713f00e..178f29e 100644 --- a/docs/copy/index.md +++ b/docs/copy/index.md @@ -52,6 +52,7 @@ Copy files from SRC to DEST repositories. | Version | Change | |---------|--------| +| unreleased | fix(copy): skip PR close when running with --local/--skip-commit | | 0.7.1 | fix(cmd_copy): add warning for unknown comment prefix in sync process | | 0.6.0 | fix(copy): apply skip_sections when creating new files with sections | | 0.6.0 | fix(copy): commit synced files before running verify steps | From d362b9d852cbd1f0dddb898acca11ebdf0f6a469 Mon Sep 17 00:00:00 2001 From: Espen Albert Date: Fri, 13 Feb 2026 10:40:33 +0000 Subject: [PATCH 3/3] chore: use pr number --- .changelog/{000.yaml => 021.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .changelog/{000.yaml => 021.yaml} (100%) diff --git a/.changelog/000.yaml b/.changelog/021.yaml similarity index 100% rename from .changelog/000.yaml rename to .changelog/021.yaml