Skip to content

Retrieve team that handles a backport#2393

Merged
apiraino merged 1 commit intorust-lang:masterfrom
apiraino:get-team-backport-zulip-notif
May 6, 2026
Merged

Retrieve team that handles a backport#2393
apiraino merged 1 commit intorust-lang:masterfrom
apiraino:get-team-backport-zulip-notif

Conversation

@apiraino
Copy link
Copy Markdown
Contributor

@apiraino apiraino commented May 4, 2026

Closes #2391

This patch adds a call to the Zulip API to get the the stream name from where the message is sent. The stream name is then used to infer the team name that approve/decline a backport.

It's not easy to figure out in a reliable way which team approves a backport:

  • Look at the t-* labels of a PR? What if there are more than one?
  • Look at the person sending the message backport approve beta 123? Anybody can use @**triagebot**
  • Look from which Zulip stream the message comes? Well, Zulip comments can be written anywhere

So unless I missed a better way to do it, I choose the third option. In the worst case the team name will be empty rather than wrong 🤷

r? @Urgau

thanks

Copy link
Copy Markdown
Member

@Urgau Urgau left a comment

Choose a reason for hiding this comment

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

As you said I'm not sure we can do much better.

The code looks reasonable. Two nits.

View changes since this review

Comment thread src/zulip.rs Outdated
Comment thread src/zulip/client.rs Outdated
Urgau

This comment was marked as duplicate.

@apiraino apiraino force-pushed the get-team-backport-zulip-notif branch from 7b049be to 35fb295 Compare May 5, 2026 13:18
@apiraino
Copy link
Copy Markdown
Contributor Author

apiraino commented May 5, 2026

applied suggestions and rebased. thanks!

edit: I fixed a strange typo(?) in your suggestion, unsure where it comes from

@apiraino apiraino requested a review from Urgau May 5, 2026 13:20
@apiraino apiraino enabled auto-merge May 5, 2026 13:20
@apiraino apiraino force-pushed the get-team-backport-zulip-notif branch from 35fb295 to f3b7cb5 Compare May 5, 2026 14:30
Comment thread src/zulip.rs Outdated
@apiraino apiraino force-pushed the get-team-backport-zulip-notif branch from f0f8272 to a8e0c07 Compare May 5, 2026 16:48
Comment thread src/zulip.rs Outdated
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
@apiraino apiraino force-pushed the get-team-backport-zulip-notif branch from 5f86237 to d671884 Compare May 6, 2026 09:05
@apiraino apiraino requested a review from Urgau May 6, 2026 12:37
@apiraino apiraino added this pull request to the merge queue May 6, 2026
Merged via the queue into rust-lang:master with commit 9c2b336 May 6, 2026
3 checks passed
@apiraino apiraino deleted the get-team-backport-zulip-notif branch May 6, 2026 13:45
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.

Backport comments should identify the right team

2 participants