triagebot: Link to Zulip stream from GitHub issue is broken

Issue

Rustbot’s link

https://rust-lang.zulipchat.com/#narrow/stream/233931-xxx/topic/Use.20sane.20defaults.20in.20x.py.20compiler-team.23326

Actual link

https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Improve.20defaults.20in.20x.2Epy.20compiler-team.23326

Diff

-https://rust-lang.zulipchat.com/#narrow/stream/233931-xxx/topic/Use.20sane.20defaults.20in.20x.py.20compiler-team.23326
+https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Improve.20defaults.20in.20x.2Epy.20compiler-team.23326

Summary

I think there are two issues here:

  1. Rustbot has xxx instead of t-compiler.2Fmajor-changes
  2. The GitHub issue name was changed and Rustbot didn’t update the link. I’m not sure if it’s worth it, but maybe there’s a way to listen for a title change and then update the link or at least post the new one?

Cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Improve.20defaults.20in.20x.2Epy.20compiler-team.23326/near/204243761

This issue has been assigned to @camelid via this comment.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 28 (28 by maintainers)

Most upvoted comments

It’s quite possible there’s a bug in that code, I made a quick and best effort attempt at replicating what the Zulip codebase is doing - PRs appreciated.

My impression was that if we specify change_all for propagate mode, we could change the topic by just posting a new message to it (and maybe using that message’s ID?).

I don’t believe we have an impl for the update message endpoint, so you’d have to add one.

Sounds great! We probably want to do that here then and edit the first comment ourselves.

The github issue being renamed shouldn’t affect the Zulip topic at all in the sense that all links etc should still work… I think a comment on the github issue makes a lot more sense, personally.

No, you only need the stream ID. We could also add stream names to our configuration, but regardless the stream name doesn’t matter because it’s not the problem – URLs with any characters instead of the stream name will work. e.g.,

https://rust-lang.zulipchat.com/#narrow/stream/233931-this-is-a-sweet-stream/topic/Improve.20defaults.20in.20x.2Epy.20compiler-team.23326

works quite fine.

Alternatively, the solution to problem 2 is to just have the issue number in the Zulip topic and not have the name. Rustbot would post the name as the first message in the topic. The downside is that you have to open the topic to see what it’s about, which kind of defeats the purpose of a topic!

Yeah I think this is basically not going to work, since the topic being useful is much more valuable than preserving the link – the link, can, after all be readily updated by folks.