Skip to content

Remove new_pr labels when converting PR to draft or closing#2091

Merged
Urgau merged 4 commits intorust-lang:masterfrom
Urgau:remove-new_pr-labels-when-draft
Jul 1, 2025
Merged

Remove new_pr labels when converting PR to draft or closing#2091
Urgau merged 4 commits intorust-lang:masterfrom
Urgau:remove-new_pr-labels-when-draft

Conversation

@Urgau
Copy link
Copy Markdown
Member

@Urgau Urgau commented Jun 29, 2025

This PR updates the logic in [autolabel] to remove the new_pr = true labels when a PR is converted to draft or closed. (we re-add them when reopening a pr or marking the pr as ready for review)

It doesn't add draft labels (ie S-waiting-on-draft) but that's pre-existing (opening a draft PR also doesn't add it).

Related to #1768 (comment).

@Urgau Urgau requested a review from Kobzol June 29, 2025 12:49
Copy link
Copy Markdown
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.

When a PR is converted to draft, the trigger_files autolabelling probably shouldn't be triggered 🤔

Comment thread src/handlers/autolabel.rs Outdated
@Urgau Urgau force-pushed the remove-new_pr-labels-when-draft branch from 63cbb4c to 0c50534 Compare June 30, 2025 21:07
Comment thread src/handlers/autolabel.rs Outdated
@Urgau Urgau changed the title Remove new_pr labels when converting PR to draft Remove new_pr labels when converting PR to draft or closing Jul 1, 2025
Comment thread src/handlers/autolabel.rs
Copy link
Copy Markdown
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.

Feel free to merge with/without the rewordings.

Comment thread src/handlers/autolabel.rs Outdated
Comment thread src/handlers/autolabel.rs Outdated
Comment thread src/handlers/autolabel.rs Outdated
@Urgau Urgau force-pushed the remove-new_pr-labels-when-draft branch from 807a8af to 4af2080 Compare July 1, 2025 18:32
@Urgau Urgau added this pull request to the merge queue Jul 1, 2025
Merged via the queue into rust-lang:master with commit d90975b Jul 1, 2025
3 checks passed
@Urgau Urgau deleted the remove-new_pr-labels-when-draft branch July 1, 2025 18:53
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.

2 participants