Skip to content

Add new_draft kind of labels in [autolabel] #2104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Jul 8, 2025

This PR adds a new kind new_draft for labels in [autolabel], this is so that we can handle S-waiting-on-author in a similar way to S-waiting-on-review (ie add it when the PR is in draft state and remove it when it's not).

[autolabel."S-waiting-on-author"]
new_draft = true

Fixes #2102

Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Thanks for taking a look! I wonder if we should just have some "label anti-matter", where we would say that label A is mutually exclusive with label B 😆

This will also set new draft PRs to be in the waiting on author status, I wonder if it won't be confusing to some people. Anyway, we'll see in practice as usually. This will need documentation in the Forge an a rustc PR, as usually.

@Urgau
Copy link
Member Author

Urgau commented Jul 9, 2025

we would say that label A is mutually exclusive with label B

I don't think it would necessarily help as removing a label (e.g. S-waiting-on-review) wouldn't add S-waiting-on-author, only adding S-waiting-on-author would remove S-waiting-on-review, right?

I say this as we have many exclusive labels around S-waiting-on-*.

In any case let's merge this as I think it's useful even if we later add an exclusive mechanism.

@Urgau Urgau added this pull request to the merge queue Jul 9, 2025
Merged via the queue into rust-lang:master with commit 8a9c3a1 Jul 9, 2025
3 checks passed
@Urgau Urgau deleted the autolabel-new_draft branch July 9, 2025 16:27
@jieyouxu
Copy link
Member

FWIW, I don't think it's possible to enforce exclusive labels, because can't you manually apply both labels at the same time?

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 10, 2025
… r=Kobzol

Auto-add `S-waiting-on-author` when the PR is/switches to draft state

This PR adds the `S-waiting-on-author` as a `new_draft` when the PR is/switches to draft state.

Related to rust-lang/triagebot#2102 & rust-lang/triagebot#2104

cc `@jieyouxu`
r? `@Kobzol`
rust-timer added a commit to rust-lang/rust that referenced this pull request Jul 10, 2025
Rollup merge of #143695 - Urgau:waiting-on-author-new_draft, r=Kobzol

Auto-add `S-waiting-on-author` when the PR is/switches to draft state

This PR adds the `S-waiting-on-author` as a `new_draft` when the PR is/switches to draft state.

Related to rust-lang/triagebot#2102 & rust-lang/triagebot#2104

cc `@jieyouxu`
r? `@Kobzol`
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Jul 15, 2025
Auto-add `S-waiting-on-author` when the PR is/switches to draft state

This PR adds the `S-waiting-on-author` as a `new_draft` when the PR is/switches to draft state.

Related to rust-lang/triagebot#2102 & rust-lang/triagebot#2104

cc `@jieyouxu`
r? `@Kobzol`
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.

Edge case: draft PR marked as S-waiting-on-author receives S-waiting-on-review on undraft in addition instead of flip
3 participants