-
Notifications
You must be signed in to change notification settings - Fork 77
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
Link to Zulip stream from GitHub issue is broken #701
Comments
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! |
(1) is supposed to work -- according to the Zulip developers, that part of the URL is ignored. We don't actually know the stream name so can't readily insert it. (2) would be feasible though a bit painful. It looks like there's not a documented way to rename topics through the API. I suspect that most proposals that change titles should probably just open a new proposal, or we can edit the comment for now. Note that the Github issue name changing shouldn't break links AFAIK -- the problem is that someone changed the title of the topic in Zulip without also updating the issue comment on GitHub. |
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. |
@rustbot modify labels to invalid |
We don't know the stream name? Don't we need to know it to create the topic? |
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., works quite fine. |
So do you think it's worth it to fix this? For example, by detecting GitHub issue title changes and updating the Zulip title so that people don't do it manually |
Generally speaking, sure, I'd love to fix this. However, I think it's going to be quite hard.
What we could do relatively easily, though, is to detect changes in the issue title on GitHub and post a comment asking someone to edit the topic in Zulip and update the link in the first comment by the bot. An alternative to that would be to, on changes to the GitHub issue title, post a new comment on Zulip saying "hey this is the continued discussion from " into a new topic. I'd rather not do that though as diverging the two topics on Zulip seems kinda annoying. |
Or maybe we could just post something to the original Zulip topic saying that the GitHub issue was renamed? |
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. |
Could we ask the Zulip folks for a "rename topic" API endpoint? |
Yeah, that's what I was thinking |
Okay, I just filed an issue: zulip/zulip#15846 Feel free to add to it! |
@Mark-Simulacrum Does |
Seems to be -- https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issues -- but I can't be 100% sure. |
|
Might as well mark this as claimed @rustbot claim |
Apparently, there is actually a way to rename topics: zulip/zulip#15846 (comment) |
Sounds great! We probably want to do that here then and edit the first comment ourselves. |
Does Rustbot keep track of its comments? If not, maybe we edit the original issue text and add a Zulip link there instead of posting a separate MCP comment? (I.e., put some of the contents of this in the issue post.) |
Is there a way to access the update-message endpoint from the |
Hmm, I think Rustbot will need to keep track of the message ID for the topic it creates (unless it is already). Maybe it makes more sense to just have someone manually rename the topic? |
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. |
I didn't think of that :) |
The name of the topic was not changed. I started a new topic then linked to the new topic from the old one. The old one should still work: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Use.20sane.20defaults.20in.20x.2Epy.20compiler-team.23326 |
Huh, it looks like we might have an additional issue here then. For the original topic: Rustbot linkActual linkIf we compare the Rustbot link (and elaborate the @Mark-Simulacrum Is this is an error with string encoding? |
From what I see in the rest of the link, it looks like Zulip encodes special characters as a |
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. |
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
Summary
I think there are two issues here:
xxx
instead oft-compiler.2Fmajor-changes
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.
The text was updated successfully, but these errors were encountered: