Skip to content

docs: state that a renamed file counts at both of its paths - #12255

Open
sileht wants to merge 1 commit into
mainfrom
devs/sileht/scopes-rename-previous-path/state-renamed-file-counts-paths--6cda6670
Open

docs: state that a renamed file counts at both of its paths#12255
sileht wants to merge 1 commit into
mainfrom
devs/sileht/scopes-rename-previous-path/state-renamed-file-counts-paths--6cda6670

Conversation

@sileht

@sileht sileht commented Jul 29, 2026

Copy link
Copy Markdown
Member

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

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
Copilot AI review requested due to automatic review settings July 29, 2026 11:08
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 29, 2026 11:08 Failure
@sileht
sileht marked this pull request as ready for review July 29, 2026 11:09
@mergify

mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 6 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
  • #review-threads-unresolved = 0
This rule is failing.
  • #review-requested = 0
  • #review-threads-unresolved = 0
  • #changes-requested-reviews-by = 0

Show 4 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team July 29, 2026 11:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
@mergify
mergify Bot requested a review from a team July 29, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants