Skip to content

Assign priority to issues from Zulip#2337

Open
apiraino wants to merge 1 commit intorust-lang:masterfrom
apiraino:assign-priority-from-zulip
Open

Assign priority to issues from Zulip#2337
apiraino wants to merge 1 commit intorust-lang:masterfrom
apiraino:assign-priority-from-zulip

Conversation

@apiraino
Copy link
Contributor

@apiraino apiraino commented Mar 6, 2026

Triagebot learns how to post a comment on GitHub to assign priority to an issue that is marked as regression. The command is sent from the Zulip Rust lang chat instance. The syntax is:

@triagebot prio #issue <priority>

example @triagebot prio #123456 high

The comment on GitHub is my usual comment on issue priority:

Assigning P-high (discussion on [Zulip](<zulip-link>)).

This handler checks that:

  • issue number is really an issue (prevents assigning priority to PRs)
  • the priority value is allowed

r? @Urgau

Thanks for a review!

@apiraino apiraino force-pushed the assign-priority-from-zulip branch from 79a594b to 4f9726f Compare March 6, 2026 15:18
@apiraino apiraino requested a review from Kobzol March 6, 2026 15:19
@apiraino apiraino enabled auto-merge March 6, 2026 15:28
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.

Looks good! Left one comment.

View changes since this review

};

// Ensure this an issue
let issue = repository
Copy link
Member

@Kobzol Kobzol Mar 6, 2026

Choose a reason for hiding this comment

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

Note that this doesn't actually check if the issue isn't a PR, e.g. this works: gh api /repos/rust-lang/rust/issues/153503 for rust-lang/rust#153503. I think you wanted to check it based on this PR's description (?). You can just check if issue.pull_request is not None, and error out in that case.

Copy link
Contributor Author

@apiraino apiraino Mar 6, 2026

Choose a reason for hiding this comment

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

yeah sort of. Since we have this method that returns error if the issue number provided is not a pull request, I thought get_issue() worked the other way (and admittedly didn't test).

I'll use issue.pull_request() as you suggest, thanks

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.

3 participants