Skip to content

Commit f91f2bb

Browse files
authored
Merge pull request #1057 from Urgau/triagebot-lock
Add documentation for triagebot `[lock]` handler
2 parents 10a4e1d + aaa659c commit f91f2bb

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [Issue Links](./triagebot/issue-links.md)
3030
- [Issue Transfer](./triagebot/transfer.md)
3131
- [Labeling](./triagebot/labeling.md)
32+
- [Lock](./triagebot/lock.md)
3233
- [Major Changes](./triagebot/major-changes.md)
3334
- [Mentions](./triagebot/mentions.md)
3435
- [Merge Conflicts](./triagebot/merge-conflicts.md)

src/triagebot/lock.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Lock
2+
3+
The `lock`/`unlock` commands can be used to lock and unlock a GitHub issue or pull request.
4+
5+
## Usage
6+
7+
### Lock
8+
9+
To lock an issue or pull request, any rust-lang team member may enter the command:
10+
11+
```text
12+
@rustbot lock
13+
```
14+
15+
This will immediately lock the issue or PR.
16+
17+
### Unlock
18+
19+
To unlock an issue or pull request, any rust-lang team member may enter the command:
20+
21+
```text
22+
@rustbot unlock
23+
```
24+
25+
> [!NOTE]
26+
> The triagebot Zulip `unlock` command can be used in case it's not possible
27+
> for the team member to post a command.
28+
29+
## Configuration
30+
31+
This feature is enabled on a repository by having a `[lock]` table in `triagebot.toml`:
32+
33+
```toml
34+
[lock]
35+
```
36+
37+
## Implementation
38+
39+
See [`src/handlers/lock.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/lock.rs) and
40+
[`parser/src/command/lock.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/parser/src/command/lock.rs).

src/triagebot/zulip-commands.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ You can send these commands as a direct message to the [triagebot][triagebot-dm]
1414
- `whoami`: shows the Rust teams that you are a part of
1515
- `lookup github <zulip-name>`: lookup the GitHub username of a user by their Zulip name
1616
- `lookup zulip <github-username>`: lookup the Zulip name of a user by their GitHub username
17+
- `unlock [--org <org>] <repo> <issue-id>`: permits unlocking a given issue or pull request (default org: rust-lang)
1718
- `user-info <user-name> [--org <org>]`: show basic information about the given GitHub account, including its recent comments and PRs created in the given GitHub organization (`org`)
1819
- `team-stats <team-name>`: show the review workqueue statistics of all members of the given team
1920
- `team-stats <team-name> <repo>`: show the review workqueue statistics of all members of the given
@@ -44,6 +45,7 @@ Note that the impersonation functionality is intended for inspecting the status
4445
- `@**triagebot** docs-update`: Generates a Pull Request ([example](https://github.com/rust-lang/rust/pull/141923)) to update the documentation submodules. See [Documentation Updates](doc-updates.md).
4546
- `@**triagebot** backport [stable | beta ] [approve | decline ] <PR>` (example: "@triagebot backport beta approve 123456") Will post a comment on GitHub to approve or decline a PR backport (see [Backports](../compiler/backports.md)).
4647
- `@**triagebot** assign-prio <issue #> [ critical | high | medium | low | none ]` will assign a priority label to an issue (see [Prioritization][prio]). "none" will just remove the `I-prioritize` label.
48+
- `@**triagebot** unlock [--org <org>] <repo> <issue-id>`: permits unlocking a given issue or pull request (default org: rust-lang).
4749

4850
[prio]: ../compiler/prioritization.md
4951

0 commit comments

Comments
 (0)