Skip to content

allow setting zulip stream history visibility - #2732

Merged
marcoieni merged 2 commits into
mainfrom
allow-setting-zulip-stream-history-visibility
Sep 4, 2026
Merged

allow setting zulip stream history visibility#2732
marcoieni merged 2 commits into
mainfrom
allow-setting-zulip-stream-history-visibility

Conversation

@marcoieni

@marcoieni marcoieni commented Sep 3, 2026

Copy link
Copy Markdown
Member

In #t-infra > ✔ DM groups in Zulip @ 💬 they asked me to modify a zulip stream visibility.
However, it's a private stream and I'm not part of it, so I can't.
I also don't want to log in with rust-lang-owner.

Merging this PR should set this field via the API.

Manual test

Unfortunately the dry run of github actions doesn't test zulip, because you cannot have a read-only Zulip token.

I tested this by running cargo run -- sync --services zulip print-plan locally by provisioning an API key for my account.
I verified that no streams that I'm in are modified.

I also verified that a stream I'm in would be updated when editing the file locally:

    💻 Stream History Diffs:
    📝 Updating stream history:
      Name: t-crates-io/operations
      ID: 346296
      Public history: true

I had to edit the program locally to avoid errors like:

[ERROR rust_team] failed: Id of stream 'funding/private' not found. The stream probably doesn't exist and sync-team doesn't support creating it yet. Please create the stream manually and add the rust-lang-owner user to it.

AI disclosure

I used GPT5.6-Sol with the codex harness to generate this change. I reviewed its output.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Dry-run check results

[WARN  rust_team::sync] sync-team is running in dry mode, no changes will be applied.
[INFO  rust_team::sync] synchronizing crates-io
[INFO  rust_team::sync] synchronizing github
[INFO  rust_team::sync] 💻 Repo Diffs:
    📝 Editing repo 'rust-lang/rustup':
      Environments:
        ❌ Delete: copilot

@marcoieni
marcoieni marked this pull request as ready for review September 3, 2026 16:34
@rustbot

rustbot commented Sep 3, 2026

Copy link
Copy Markdown

rust_team_data/src/v1.rs has been modified, it is used (as a git dependency) by multiple sub-projects like triagebot, the www.rust-lang.org website and others.

If you are changing the data structures, please make sure that the changes are not going to break serde deserialization (adding a field is fine; removing or renaming a field isn't).

If you must do a breaking change to the format, make sure to coordinate it with all the users of the rust_team_data crate.

Comment thread src/sync/zulip/api.rs
Comment thread src/sync/zulip/mod.rs Outdated

pub(crate) fn is_empty(&self) -> bool {
self.user_group_diffs.is_empty() && self.stream_membership_diffs.is_empty()
self.user_group_diffs.is_empty()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While we're modifying this, could you please use destructuring here, to make it harder to forget when we add new fields?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done in 1f92a3d

@marcoieni
marcoieni added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit f195554 Sep 4, 2026
4 checks passed
@marcoieni
marcoieni deleted the allow-setting-zulip-stream-history-visibility branch September 4, 2026 20:06
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.

4 participants