docs: state that a renamed file counts at both of its paths - #12255
Open
sileht wants to merge 1 commit into
Open
docs: state that a renamed file counts at both of its paths#12255sileht wants to merge 1 commit into
sileht wants to merge 1 commit into
Conversation
The rename semantics of file-pattern scopes, `barrier_files` and the `files` / `added-files` / `removed-files` / `modified-files` condition attributes were written down nowhere, so the only way to learn that a rename is treated as a removal at the source plus an addition at the destination was to try it. Document the rule where each surface is described, with the `git mv` example spelled out attribute by attribute, and note that `#files` is GitHub's own changed-file count and so does not equal the length of `files` on a pull request containing a rename. Related to MRGFY-8248 Change-Id: I6cda667056c5aef19df77caace5438d458b92c7a
Contributor
Merge Protections🔴 2 of 6 protections blocking · waiting on 👀 reviews
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
Documents how Mergify treats renamed files when evaluating file-pattern scopes, barrier_files, and condition attributes like files / added-files / removed-files / modified-files, including the note that GitHub’s #files count differs from Mergify’s files list length on renames.
Changes:
- Add an “important behavior” note that renames are matched at both the source and destination paths for scopes and
barrier_files. - Add a conditions reference section explaining rename semantics across
files,added-files,removed-files,modified-files, and#files. - Reinforce barrier behavior in the scopes overview doc.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/content/docs/merge-queue/scopes/file-patterns.mdx | Adds a section explaining that renamed files are matched at both paths for scope detection and barrier_files. |
| src/content/docs/merge-queue/scopes.mdx | Adds a concise note that renames match both paths for barrier_files behavior. |
| src/content/docs/configuration/conditions.mdx | Adds a “Renamed Files” subsection documenting rename semantics for file-related condition attributes and #files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+148
to
+151
| Given the scopes above, `git mv api/auth.py web/auth.py` reports **both** `python-api` | ||
| and `frontend`. That matters when a scope guards something: a pull request that moves a | ||
| file out of `api/` is a change to `api/`, and the `python-api` scope's CI jobs and | ||
| batching rules apply to it. |
jd
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rename semantics of file-pattern scopes,
barrier_filesand thefiles/added-files/removed-files/modified-filescondition attributes werewritten down nowhere, so the only way to learn that a rename is treated as a
removal at the source plus an addition at the destination was to try it.
Document the rule where each surface is described, with the
git mvexamplespelled out attribute by attribute, and note that
#filesis GitHub's ownchanged-file count and so does not equal the length of
fileson a pullrequest containing a rename.
Related to MRGFY-8248