Skip to content

Conversation

@apiraino
Copy link
Contributor

@apiraino apiraino commented Sep 3, 2025

Discussion on #triagebot > Generic shorcut handler @ 💬).

WIP, currently blocked on a lifetime issue

Closes #1634 and #2002

@apiraino apiraino force-pushed the alias-for-compound-labels branch 12 times, most recently from 6483af4 to fd2c1cb Compare September 5, 2025 16:09
@apiraino apiraino marked this pull request as ready for review September 5, 2025 16:18
@apiraino
Copy link
Contributor Author

apiraino commented Sep 5, 2025

I think now it's ready for review. I've tested this patch on my test repository

r? triagebot

@apiraino
Copy link
Contributor Author

r? @Urgau when you have time, thanks.

(will rebase before merge)

@rustbot rustbot assigned Urgau and unassigned ehuss Oct 17, 2025
Copy link
Member

@Urgau Urgau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me. Mainly some small nits.

View changes since this review

@apiraino apiraino force-pushed the alias-for-compound-labels branch 3 times, most recently from 7cf67bc to a38ad42 Compare October 20, 2025 12:26
@apiraino apiraino requested a review from Urgau October 20, 2025 13:07
@apiraino apiraino force-pushed the alias-for-compound-labels branch 4 times, most recently from 50c0ff1 to 31f0e2f Compare October 21, 2025 10:51
@apiraino apiraino force-pushed the alias-for-compound-labels branch from 3da8091 to 8192865 Compare October 21, 2025 11:03
@apiraino
Copy link
Contributor Author

@Urgau hopefully it should be ready to merge

@apiraino apiraino force-pushed the alias-for-compound-labels branch 2 times, most recently from 2b06b8a to c82efd6 Compare October 21, 2025 14:16
Copy link
Member

@Urgau Urgau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, modulo the unnecessary exposure of the parser internals.

View changes since this review

Configure relabel command aliases from the `triagebot.toml`.
When a valid alias is parsed, it will be replaced with the labels configured.

Example configuration:
```
[relabel.cmd-alias]
add-labels = ["Foo", "Bar"]
rem-labels = ["Baz"]
```

The command `@rustbot label cmd-alias` translates to:
```
@rustbot label +Foo +Bar -Baz
```

The command `@rustbot label -cmd-alias` translates to:
```
@rustbot label +Baz -Foo -Bar
```

Note: self-canceling labels will be omitted.
The command `@rustbot label cmd-alias +Baz` translates to:
```
@rustbot label +Foo +Bar
```
@apiraino apiraino force-pushed the alias-for-compound-labels branch from c82efd6 to 154a7e7 Compare October 21, 2025 16:49
Copy link
Member

@Urgau Urgau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Urgau Urgau added this pull request to the merge queue Oct 21, 2025
Merged via the queue into rust-lang:master with commit 1d62ded Oct 21, 2025
3 checks passed
@apiraino apiraino deleted the alias-for-compound-labels branch October 21, 2025 18:47
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 31, 2025
…rgau

Enable regression labeling aliases

Enabling label aliases when regressions bleed into the next release channel (nightly -> beta, beta -> stable).

This configuration enables these two aliases:
- ``@rustbot` label to-beta` (switch regression label <anything> -> beta)
- ``@rustbot` label to-stable` (switch regression label <anything> -> beta)

Pending merge of [triagebot#2172](rust-lang/triagebot#2172)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 31, 2025
…rgau

Enable regression labeling aliases

Enabling label aliases when regressions bleed into the next release channel (nightly -> beta, beta -> stable).

This configuration enables these two aliases:
- ```@rustbot`` label to-beta` (switch regression label <anything> -> beta)
- ```@rustbot`` label to-stable` (switch regression label <anything> -> beta)

Pending merge of [triagebot#2172](rust-lang/triagebot#2172)
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 1, 2025
…rgau

Enable regression labeling aliases

Enabling label aliases when regressions bleed into the next release channel (nightly -> beta, beta -> stable).

This configuration enables these two aliases:
- ````@rustbot``` label to-beta` (switch regression label <anything> -> beta)
- ````@rustbot``` label to-stable` (switch regression label <anything> -> beta)

Pending merge of [triagebot#2172](rust-lang/triagebot#2172)
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 1, 2025
…rgau

Enable regression labeling aliases

Enabling label aliases when regressions bleed into the next release channel (nightly -> beta, beta -> stable).

This configuration enables these two aliases:
- `````@rustbot```` label to-beta` (switch regression label <anything> -> beta)
- `````@rustbot```` label to-stable` (switch regression label <anything> -> beta)

Pending merge of [triagebot#2172](rust-lang/triagebot#2172)
rust-timer added a commit to rust-lang/rust that referenced this pull request Nov 1, 2025
Rollup merge of #147942 - apiraino:enable-label-aliases, r=Urgau

Enable regression labeling aliases

Enabling label aliases when regressions bleed into the next release channel (nightly -> beta, beta -> stable).

This configuration enables these two aliases:
- ```@rustbot`` label to-beta` (switch regression label <anything> -> beta)
- ```@rustbot`` label to-stable` (switch regression label <anything> -> beta)

Pending merge of [triagebot#2172](rust-lang/triagebot#2172)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

label names handled by the shortcut command should be configurable

3 participants