Skip to content

Commit bb0d4f2

Browse files
authored
Merge pull request #945 from Urgau/triagebot-mentions-content
Add documentation for `type="content"` in triagebot mentions
2 parents 2abc968 + 3199f9c commit bb0d4f2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/triagebot/mentions.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ Mentions are triggered automatically when a PR is opened (or new changes are pus
1010
## Configuration
1111

1212
To enable mentions, add entries to the `[mentions]` table in `triagebot.toml`.
13-
Each key in the table should be a path in the repo.
14-
Triagebot will check for modifications to any file that **starts with** the given path.
13+
Each key in the table should either be a path in the repo or should be a string (when `type="content"`).
14+
15+
Triagebot will check for modifications:
16+
- to any file that **starts with** the given path when `type="filename"` (the default)
17+
- or to any modified lines of the PR when `type="content"`
18+
1519
For example, `library/std` would match anything under the `library/std` directory like `library/std/src/process.rs`.
1620

1721
There are two optional values that can be specified in the table:
1822

23+
* `type` --- Specifies the matching type that must be satisfied, either `filename` (the default) or `content`.
1924
* `cc` --- A list of strings of users to ping.
2025
They should start with `@` like `@ehuss` or `@rust-lang/clippy`.
2126
If this is not specified, nobody will be pinged.
@@ -34,6 +39,10 @@ rustdoc-json-types is a **public** (although nightly-only) API.
3439
If possible, consider changing `src/librustdoc/json/conversions.rs`;
3540
otherwise, make sure you bump the `FORMAT_VERSION` constant.
3641
"""
42+
43+
[mentions."#[rustc_attr]"]
44+
type = "content"
45+
cc = ["@someone"]
3746
```
3847

3948
## Implementation

0 commit comments

Comments
 (0)