Skip to content
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

[meta] Clarify prioritization alert #119959

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion triagebot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ message_on_add = """\
- Priority?
- Regression?
- Notify people/groups?
- Needs `I-nominated`?
- Needs `I-{team}-nominated`?
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious how the {team} placeholder is resolved (probably by the triagebot?) 🤔

I'll check that, too.

Copy link
Member Author

@fmease fmease Jan 14, 2024

Choose a reason for hiding this comment

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

Oh right, {variable} gets substituted by triagebot, I forgot. Well, I don't know how triagebot will deal with this, I don't think it will substitute a team since team isn't defined anywhere I assume. {team} was actually only meant as a placeholder for humans (“some team”) not for triagebot. If you have concrete suggestions I can change the placeholder.

Copy link
Contributor

@apiraino apiraino Jan 14, 2024

Choose a reason for hiding this comment

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

I think when the Triagebot is about to emit the notification to Zulip (in this point) if there is a T-* label associated with the issue I can infer which team to use to replace {team}.

Not 100% sure it works as I suspect, I need to check a few assumptions but worth a try. Let me get back to you on this before merging this patch 🙂

Copy link
Member Author

@fmease fmease Jan 14, 2024

Choose a reason for hiding this comment

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

I can submit a patch to triagebot, too, if you'd like to. It should be as simple as:

let mut teams = event
    .issue
    .labels
    .iter()
    .map(|label| &label.name)
    .filter_map(|label| label.strip_prefix("T-"));
if let Some(team) = teams.next()
    && teams.next().is_none()
{
    topic = topic.replace("{team}", team);
}

However, it would hard-code the concept of “teams” and rust-lang/rust's labeling system (in which T-* labels represent teams) and as far as I remember, triagebot wants to stay repository-agnostic.

Copy link
Contributor

Choose a reason for hiding this comment

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

@fmease left a proposal at rust-lang/triagebot#1766

"""
message_on_remove = "Issue #{number}'s prioritization request has been removed."
message_on_close = "Issue #{number} has been closed while requested for prioritization."
Expand Down
Loading