Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/content/docs/workflow/actions/label.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ keep matching does not keep calling GitHub.
:::caution
**Avoid rule pairs that flip the same label.** If one rule adds a label and
another removes it, and both rules' conditions keep matching after each
flip, the label toggles back and forth indefinitely. Every change
re-triggers rule evaluation. Scope your conditions so they become mutually
flip, the label toggles back and forth, because every change re-triggers
[rule evaluation](/workflow#how-rules-are-evaluated).

Mergify detects these loops. Once two rules have reversed each other on the
same label enough times in quick succession, Mergify stops changing that
label on that pull request in either direction, and reports a failing check
run naming the label and the rules that were undoing each other. The label
then stays as it is and no longer follows the pull request's state until
your Mergify configuration changes.

Do not rely on that backstop. Scope your conditions so they become mutually
exclusive once the label is applied. For example, guard post-merge cleanup
rules with the `merged` condition and drop that label from any opposing
rule's conditions.
Expand Down