Skip to content

shared-config: avoid collapsing renames during sync commits#449

Merged
ZhongRuoyu merged 1 commit into
mainfrom
shared-config-fix-renames
Jul 8, 2026
Merged

shared-config: avoid collapsing renames during sync commits#449
ZhongRuoyu merged 1 commit into
mainfrom
shared-config-fix-renames

Conversation

@ZhongRuoyu

@ZhongRuoyu ZhongRuoyu commented Jul 8, 2026

Copy link
Copy Markdown
Member

Use git diff --no-renames when collecting staged paths so a synced delete/add pair is committed as separate paths. This keeps deprecated workflow removals in the same sync run that adds their replacement.

For context, this fixes an issue where the rename of the stale-issues-and-prs workflow could not be done in a single sync, like:

Use `git diff --no-renames` when collecting staged paths so a synced
delete/add pair is committed as separate paths. This keeps deprecated
workflow removals in the same sync run that adds their replacement.
Copilot AI review requested due to automatic review settings July 8, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the shared-config sync action to avoid Git rename detection when enumerating staged changes, so delete/add pairs are treated as two distinct paths and therefore committed separately. This ensures deprecated workflow removals are captured in the same sync run that introduces their replacements.

Changes:

  • Add --no-renames to the git diff --name-only --staged call used to collect staged paths for per-path commits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ZhongRuoyu ZhongRuoyu merged commit c757508 into main Jul 8, 2026
28 checks passed
@ZhongRuoyu ZhongRuoyu deleted the shared-config-fix-renames branch July 8, 2026 10:39

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @ZhongRuoyu!

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.

4 participants