Skip to content

Commit 48db101

Browse files
ehussMark-Simulacrum
authored andcommitted
Triagebot: merge-conflicts
1 parent 3f75630 commit 48db101

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [Labeling](./triagebot/labeling.md)
2525
- [Major Changes](./triagebot/major-changes.md)
2626
- [Mentions](./triagebot/mentions.md)
27+
- [Merge Conflicts](./triagebot/merge-conflicts.md)
2728
- [No Merge Policy](./triagebot/no-merge.md)
2829
- [Nominate](./triagebot/nominate.md)
2930
- [Note](./triagebot/note.md)

src/triagebot/merge-conflicts.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Merge Conflicts
2+
3+
The `merge-conflicts` feature detects if a Pull Request has a merge conflict, and will post a comment asking the author to resolve the conflicts.
4+
5+
## Usage
6+
7+
This is triggered automatically when a commit is made to a branch that causes existing, open PRs to have a merge conflict. The bot will post a comment to the PR that roughly looks like this:
8+
9+
> ☔ The latest upstream changes (possibly #152) made this pull request unmergeable. Please [resolve the merge conflicts](https://rustc-dev-guide.rust-lang.org/git.html#rebasing-and-conflicts).
10+
11+
Note that it may take a minute or so for the comments to be posted.
12+
13+
## Configuration
14+
15+
This feature is enabled on a repository by having a `[merge-conflicts]` table in `triagebot.toml`:
16+
17+
```toml
18+
[merge-conflicts]
19+
```
20+
21+
There are several optional keys that you can include:
22+
23+
- `remove` --- A list of labels to remove from the PR when a conflict is detected.
24+
- `add` --- A list of labels to add to the PR when a conflict is detected.
25+
- `unless` --- A list of labels that, if already present on the PR, will prevent triagebot from adding or removing labels.
26+
27+
## Example
28+
29+
```toml
30+
[merge-conflicts]
31+
remove = ['S-waiting-on-bors']
32+
add = ['S-waiting-on-author']
33+
unless = ['S-blocked', 'S-waiting-on-crater', 'S-waiting-on-team', 'S-waiting-on-review']
34+
```
35+
36+
## Implementation
37+
38+
See [`src/handlers/merge_conflicts.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/merge_conflicts.rs).

0 commit comments

Comments
 (0)