rust-lang / triagebot

Automation/tooling for Rust spaces
https://triage.rust-lang.org
Apache License 2.0
170 stars 75 forks source link

Triagebot learns how to comment on GitHub #1690

Open apiraino opened 1 year ago

apiraino commented 1 year ago

In this first version the triagebot learns how to post a comment on GitHub to assign priority to an issue that is marked as regression. The command is sent by the Zulip Rust lang chat instance. The syntax is:

@triagebot prio #issue <P-label>

example @triagebot prio #123456 <P-high

The posted comment on GitHub will look like:

WG-prioritization assigning priority ([Zulip discussion](<zulip-topic-link>)).
@rustbot label -I-prioritize +P-high

The zulip-topic-link part of the message is retrieved by querying the Zulip API by the message ID the webhook should send the triagebot.

I'd like the code to allow for any kind of comment to be created (but that will require a bit of refinement). Another interesting usecase: easier beta backport accept/decline during T-compiler weekly triage meeting (mentioned a while ago on Zulip) - though this is a bit more trickier because ideally I'd like to backlink a specific message from a Zulip topic.

To really test this webhook I'll need a Zulip test instance (either local or hosted one on their free tier)