-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
Update "stream", "subject" occurrences in the Git integration. #857
base: main
Are you sure you want to change the base?
Conversation
@laurynmm Could you please review this one? |
@Niloth-p - Thanks for working on this update! The changes look fine to me, so mentioning @timabbott for an integration review. Noting that the updates here to use "topic" instead of "subject" in the send message dict does make this inconsistent with the other documented examples for These updates are related to the documentation updates in zulip/zulip#32780. |
zulip/integrations/git/post-receive
Outdated
"to": destination["stream"], | ||
"subject": destination["subject"], | ||
"to": destination["channel"], | ||
"topic": destination["topic"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it backwards-compatible; no reason to break it for existing users, given that we didn't support the new configuration method until this is merged.
This can be something like destination.get("channel", destination.get("stream"))
, maybe something slightly different could be needed to do errors properly; I am not sure if None
would produce an ok exception in client.send_message
, and I don't want an exception telling someone to add a stream
field.
Reviewed, ping me on chat.zulip.org when the remaining thing is resolved. |
The config file is user facing, hence it needs to be updated for the integration doc to be updated. The post-receive hook retains support for "stream" and "subject" for backwards compatibility.
8dda448
to
33d8908
Compare
Oops, thank you! There was no error handling previously, errors were silently ignored. From the API documentation for I have now verified that the error only returns Also, I can understand if we'd want to do this renaming "stream", "subject" occurrences in all integration config files, commandline arguments and other user-facing parts, in a single pass, instead of one integration at a time. Let me know. This minimalist approach was based off of my experience with the integration docs. |
The config file is user facing, hence it needs to be updated for the integration doc to be updated.
Motivation: Updating the integration doc (user-facing, hence high priority) in #32780
This PR is intentionally kept simple.
How did you test this PR?
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: