Skip to content

Commit 48ad4dd

Browse files
Update available-rules-for-rulesets.md (#57152)
1 parent a7c440e commit 48ad4dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Metadata restrictions block "ref updates." If a contributor pushes work that inc
238238

239239
Metadata restrictions can increase friction for people contributing to a repository. Generally, if you impose metadata restrictions, you should do so on a limited set of branches to avoid impacting contributors' daily work. For example, instead of requiring consistent commit messages on any topic branch that a contributor might work on, you should require consistent commit messages on `main` only, then require pull requests into `main`.
240240

241-
If you use squash merges, you should be aware that metadata restrictions are evaluated before the merge, so all commits on the pull request must meet the requirements. For metadata restrictions that apply to committer emails, the pattern must also include `[email protected]` for squash merges to satisfy the restriction.
241+
If you use squash merges, the individual commits in the pull request are ignored. Instead, restrictions are only validated against the metadata of the single, resulting merge commit. The pull request page validates this information before the merge is allowed, ensuring the final commit is compliant. For metadata restrictions that apply to committer emails, the pattern must also include `[email protected]` for squash merges to satisfy the restriction.
242242

243243
When you add metadata restrictions to an existing branch or tag, the rules are enforced for new commits pushed to the branch or tag from that point forward, but they are not enforced against the existing history of the branch or tag.
244244

0 commit comments

Comments
 (0)