zulip/zerver/tests
Aditya Kumar Kasaudhan d1ff871523 webhooks: Support filtering GitHub activity from private repositories.
Currently, the GitHub webhook sends activity from both public and private
repositories, which could lead to unintended disclosure of sensitive
information from private repositories.

This commit introduces a ignore_private_repositories parameter to the
webhook URL. When set to true, the webhook ignore processing activity from
private repositories, ensuring that such activities are not posted to
Zulip streams. By default, if the parameter is omitted or set to false,
activities from both public and private repositories are processed
normally. This provides users with the flexibility to control the
visibility of private repository activities without altering the default
behavior.

More importantly, this introduces a cleaner mechanism for individual
incoming webhooks to declare support for settings not common to all
webhook integrations.

Fixes #31638.
2024-10-31 10:40:28 -07:00
..
fixtures slack_data_import: Fix incorrect hyperlink conversion. 2024-10-30 09:48:32 -07:00
images thumbnail: Store the post-orientation-transformation dimensions. 2024-07-24 09:56:42 -07:00
__init__.py
test_alert_words.py
test_attachments.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
test_audit_log.py settings: Add `can_move_messages_between_topics_group` realm setting. 2024-10-29 16:27:04 -07:00
test_auth_backends.py requirements: Upgrade Python requirements. 2024-10-20 18:16:27 -07:00
test_bots.py webhooks: Support filtering GitHub activity from private repositories. 2024-10-31 10:40:28 -07:00
test_cache.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
test_compatibility.py python: Reformat with Ruff formatter. 2024-02-29 17:07:16 -08:00
test_create_video_call.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_custom_profile_data.py custom_profile_fields: Add "editable_by_user" setting. 2024-09-23 18:09:38 -07:00
test_data_types.py
test_decorators.py auth: Tweak invalid credentials error message. 2024-10-24 14:35:31 -07:00
test_delete_unclaimed_attachments.py do_delete_old_unclaimed_attachments: Cap deletions at batch size. 2024-08-28 13:57:57 -07:00
test_digest.py urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
test_docs.py help-links: Limit billing related relative gear menu links. 2024-09-30 11:35:45 -07:00
test_drafts.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
test_email_change.py realm-deactivation: Send email to owners as part of deactivation. 2024-06-26 16:48:18 -07:00
test_email_log.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_email_mirror.py upload: Provide the frontend with the less-modified filename. 2024-09-09 12:40:17 -07:00
test_email_notifications.py email_notifications: Prevent html2text from mangling Unicode. 2024-10-30 09:49:23 -07:00
test_embedded_bot_system.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_event_queue.py settings: Add group_creator as default for can_manage_group. 2024-10-01 17:35:14 -07:00
test_event_system.py message: Do not differentiate topics by case when aggregating. 2024-10-03 16:35:45 -07:00
test_events.py settings: Remove `edit_topic_policy` setting. 2024-10-29 16:27:04 -07:00
test_example.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_external.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_github.py
test_health.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_home.py settings: Remove `edit_topic_policy` setting. 2024-10-29 16:27:04 -07:00
test_i18n.py invites: Lock the realm when determining invitation counts. 2024-05-02 14:23:04 -07:00
test_import_export.py thumbnail: Make thumbnailing work with data import. 2024-10-24 10:32:51 -07:00
test_integrations.py refactor: Relocate screenshots scripts to new tools/screenshots dir. 2024-05-14 16:17:44 -07:00
test_integrations_dev_panel.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_internet.py
test_invite.py groups: Accept anonymous groups for create_multiuse_invite_group. 2024-10-24 14:41:09 -07:00
test_legacy_subject.py
test_link_embed.py events: Send `delete_message` event to user who deleted the message. 2024-07-16 23:29:02 -07:00
test_management_commands.py export_realm: Add RealmExport model. 2024-10-04 12:06:35 -07:00
test_markdown.py urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
test_markdown_thumbnail.py tests: Extract upload_image helpers from test_markdown_thumbnail. 2024-10-24 10:32:51 -07:00
test_mattermost_importer.py data_import: Add email validation to third-party data converters. 2024-10-15 16:04:43 -07:00
test_message_delete.py delete_message: Fix recipients of "delete_message" event. 2024-10-07 11:35:06 -07:00
test_message_dict.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
test_message_edit.py settings: Add `can_move_messages_between_topics_group` realm setting. 2024-10-29 16:27:04 -07:00
test_message_edit_notifications.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_message_fetch.py message_fetch: Add message_ids parameter to /messages request. 2024-10-07 11:00:40 -07:00
test_message_flags.py message_flags: Update 'do_update_message_flags' to send event on commit. 2024-08-19 10:14:49 -07:00
test_message_move_stream.py settings: Add `can_move_messages_between_topics_group` realm setting. 2024-10-29 16:27:04 -07:00
test_message_move_topic.py settings: Add `can_move_messages_between_topics_group` realm setting. 2024-10-29 16:27:04 -07:00
test_message_notification_emails.py urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
test_message_send.py streams: Restrict access to archived streams. 2024-10-25 16:06:43 -07:00
test_message_topics.py streams: Update translated errors for stream to channel rename. 2024-04-24 14:35:05 -07:00
test_messages.py direct_message_group: Add new `group_size` field. 2024-08-23 11:09:41 -07:00
test_middleware.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_migrations.py CVE-2024-27286: Delete dangling UserMessage rows. 2024-03-19 18:22:24 -04:00
test_mirror_users.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
test_muted_users.py audit-log: Move user muted event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
test_new_users.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_notification_data.py mention: Do not include deactivated users in group mention data. 2024-10-10 11:37:44 -07:00
test_onboarding.py
test_onboarding_steps.py topic: Add a first-time explanation for "Resolve topic". 2024-10-09 18:12:55 -07:00
test_openapi.py message_fetch: Add message_ids parameter to /messages request. 2024-10-07 11:00:40 -07:00
test_outgoing_http.py requirements: Upgrade Python requirements. 2024-09-24 19:27:21 -07:00
test_outgoing_webhook_interfaces.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
test_outgoing_webhook_system.py subscription: Include archived channels in streams list. 2024-10-25 16:06:40 -07:00
test_populate_db.py
test_presence.py presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
test_push_notifications.py urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
test_queue.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_queue_worker.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_rate_limiter.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
test_reactions.py django_api: Rename 'send_event' to 'send_event_rollback_unsafe'. 2024-09-20 15:20:18 -07:00
test_read_receipts.py refactor: Rename `huddle` to `direct_message_group` in non API. 2024-07-04 07:56:31 -07:00
test_realm.py settings: Remove `edit_topic_policy` setting. 2024-10-29 16:27:04 -07:00
test_realm_domains.py models: Extract zerver.models.realms. 2023-12-16 22:08:44 -08:00
test_realm_emoji.py settings: Add `can_add_custom_emoji_group` realm setting. 2024-10-13 16:09:04 -07:00
test_realm_export.py export_realm: Add RealmExport model. 2024-10-04 12:06:35 -07:00
test_realm_linkifiers.py audit-log: Move realm event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
test_realm_playgrounds.py models: Extract zerver.models.realms. 2023-12-16 22:08:44 -08:00
test_recipient_parsing.py scheduled_messages: Migrate to typed_endpoint. 2024-08-20 10:03:22 -07:00
test_redis_utils.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
test_report.py
test_retention.py delete_message: Fix recipients of "delete_message" event. 2024-10-07 11:35:06 -07:00
test_rocketchat_importer.py rocketchat: Validate custom emoji before larger data sets. 2024-10-17 12:25:18 -07:00
test_saved_snippets.py saved_snippets: Add backend for saved snippets. 2024-09-24 15:27:58 -07:00
test_scheduled_messages.py scheduled_messages: Remove separate logfile. 2024-10-04 14:22:37 -07:00
test_scim.py scim: Extract ROLE_TYPE_TO_NAME dict to UserProfile. 2024-08-20 11:53:24 -07:00
test_send_email.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_server_settings.py
test_service_bot_system.py zerver: Rename some message_type variables to recipient_type. 2024-09-10 12:50:28 -07:00
test_sessions.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
test_settings.py users: Allow zero-width-joiners in user names. 2024-09-03 16:34:55 -07:00
test_signup.py create_user: Handle integrity error when importing settings. 2024-10-31 09:55:01 -07:00
test_slack_importer.py data_import: Add email validation to third-party data converters. 2024-10-15 16:04:43 -07:00
test_slack_message_conversion.py slack_data_import: Fix incorrect hyperlink conversion. 2024-10-30 09:48:32 -07:00
test_soft_deactivation.py audit-log: Move user event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
test_subdomains.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
test_submessage.py django_api: Rename 'send_event' to 'send_event_rollback_unsafe'. 2024-09-20 15:20:18 -07:00
test_subs.py do_deactivate_stream: Remove unnecessary mutations. 2024-10-25 16:06:42 -07:00
test_templates.py css: Use classname instead of `div` selector for .blocks. 2024-08-13 22:36:35 -07:00
test_thumbnail.py thumbnail: Support checking for images from streaming sources. 2024-09-17 12:51:30 -07:00
test_timeout.py timeout: Rename to unsafe_timeout. 2024-04-18 11:50:38 -07:00
test_timestamp.py
test_timezone.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_tornado.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
test_transfer.py emoji: Pass down content-type, rather than guessing from extension. 2024-07-12 13:26:47 -07:00
test_tusd.py upload: Improve error messages when uploads limited by plan. 2024-10-15 13:30:29 -07:00
test_tutorial.py user_profile: Remove 'tutorial_status' field. 2024-08-15 13:31:40 -07:00
test_typed_endpoint.py endpoints: Remove the has_request_variables decorator. 2024-09-05 16:02:12 -07:00
test_typed_endpoint_validators.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
test_typing.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_upload.py avatar: Add checks to make sure system bot avatar exists. 2024-10-23 10:35:42 -07:00
test_upload_local.py upload: Allow filtering to just a prefix (e.g. a realm id). 2024-09-26 12:01:11 -07:00
test_upload_s3.py upload: Allow filtering to just a prefix (e.g. a realm id). 2024-09-26 12:01:11 -07:00
test_url_decoding.py url_decoding: Add 'is_same_server_message_link' function. 2024-06-17 10:42:32 -07:00
test_urls.py test_urls: Remove dead URLResolutionTest. 2024-09-24 18:17:52 -07:00
test_user_groups.py test_user_groups: Fix comments in group creation tests. 2024-10-22 10:23:36 -07:00
test_user_status.py user_status: Update do_update_user_status to send event on commit. 2024-07-31 22:33:52 -07:00
test_user_topics.py message: Add test coverage for 'set_visibility_policy_possible'. 2024-09-24 14:32:42 -07:00
test_users.py users: Add API endpoint to update_user_backend by real email. 2024-10-22 16:36:38 -07:00
test_validators.py endpoints: Remove the has_request_variables decorator. 2024-09-05 16:02:12 -07:00
test_webhooks_common.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
test_widgets.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
test_zcommand.py zcommand: Rename night->dark and day->light in the color scheme backend. 2024-06-30 22:45:26 -07:00
test_zephyr.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_zulip_update_announcements.py refactor: Rename `huddle` to `direct_message_group` in non API. 2024-07-04 07:56:31 -07:00