Commit Graph

1424 Commits

Author SHA1 Message Date
Tom Hubrecht
5ed5fa3315 webhooks_gitea: Use the correct actor for pull_request actions
The user associated to a pull request is always its creator, however,
when closing a pull request, this can be the wrong actor. The paylod
contains the actor in the `sender` value, use this instead.
2025-10-10 09:47:45 -07:00
Niloth P
1f4267f3e0 integrations: Add screenshot configs for monitoring integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
d70b099644 integrations: Add screenshot configs for productivity integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
433f43a9b4 integrations: Add screenshot configs for communication integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
f5e925b26b integrations: Add screenshot configs for the project management type.
of integrations that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
24eab61ab0 integrations: Add screenshot configs for deployment integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
7f2161bffa integrations: Add screenshot configs for fixtureless CI integrations. 2025-10-03 15:38:03 -07:00
Niloth P
65d01b553b integrations: Add screenshot configs for fixtureless VCS integrations.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-10-03 15:38:03 -07:00
Niloth P
c7a6fcaf88 integrations: Add new file for fixtureless screenshot configs registry.
This does not include any screenshot configs, just defining the format,
and loading FIXTURELESS_SCREENSHOT_CONFIG from the file.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-10-03 15:38:03 -07:00
Anders Kaseorg
f24a0a6b81 ruff: Fix RUF059 Unpacked variable is never used.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Lauryn Menard
0af56bb80b integrations: Update GitLab doc to direct to create webhook.
GitLab has both integrations and webhooks, and our documentation
should direct users to the webhooks set up for integrating with
Zulip.

Adds a link to GitLab's create a webhook documentation as well.
2025-09-17 09:39:48 -07:00
Alex Vandiver
dbe1f778cf grafana: Be more forgiving of missing alert keys. 2025-07-22 12:20:04 -07:00
Varun-Kolanu
93913dd6e7 integrations: Support colon and comma characters in jotform payloads.
The payload might contain colons and commas within keys and
values entered by the user. Simply splitting the fields using
", " is therefore unreliable and can lead to incorrect parsing.
Hence, this commit updates the logic for splitting fields in
the pretty data of the Jotform payload.

Fixes #32461.
2025-07-08 11:00:06 -07:00
theofficialvedantjoshi
d94ba5e45b gitlab: Add deployment webhooks.
Fixes: #34220.
2025-07-02 11:31:15 -07:00
Niloth P
fb74cd3ddf webhooks/opsgenie: Support linking to EU instances.
Adds a URL parameter to the webhook to track the region of the Opsgenie
instance (US/EU), and uses that to construct the alert URL in the
message.

Fixes #34947.
2025-06-25 11:52:02 -07:00
Anders Kaseorg
10705e0db3 validator: Disable WildValue equality comparison.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-25 11:49:02 -07:00
Varun-Kolanu
d5e9d81957 integrations: Add support for GitLab access token expiry events.
Fixes #34405.
2025-06-24 10:08:56 -07:00
Varun-Kolanu
9f5198bcd1 integrations: Add support for GitLab feature flag events.
Fixes part of #34405.
2025-06-24 10:08:56 -07:00
Niloth P
59839be9d6 integ-docs: Update the sample site URLs and bot emails.
To use the appropriate context properties.

This commit does not touch the integration docs that do not use the
new integration doc format, as this update will be included in their
format update sweep.
2025-06-20 16:04:26 -07:00
Niloth P
dab97304f6 documentation: Add context properties for subdomain and host segments.
The subdomain and host parts are already used within zulip_url, api_url,
this commit adds them as context properties themselves, so that they
can be used in email addresses and URLs without the URI scheme,
increasing uniformity.

The new context properties `display_host` and `display_subdomain` are
usable in the Help, API docs and Policies.

Occurrences of `*.zulipchat.com` have been updated to use them.
2025-06-20 16:04:26 -07:00
PieterCK
a5a2adf23d integration-doc: Add instruction to Slack integration.
This adds an instruction on how to configure which Slack channels to
integrate with Zulip.
2025-06-12 09:35:54 -07:00
PieterCK
be5a6e88e1 integrations: Fix INVALID_SLACK_TOKEN_MESSAGE.
Currently the hyperlink on the "Zulip development community" string is
not properly formatted. This fixes the formatting on the string.
2025-06-05 15:47:39 -07:00
PieterCK
0a2d7eedf8 integrations: Use real replace_link in Slack webhook.
The real `replace_link` function is now available. This cleans up the
duplicate and switches it with the real one instead.
2025-05-07 12:45:27 -07:00
nirved.mishra.eee23@itbhu.ac.in
3fc63110ac incoming-webhooks: Add OpenProject integration.
Fixes #29944.

Co-authored-by: theofficialvedantjoshi <vedant.messi101@gmail.com>
Co-authored-by: Niloth P <20315308+Niloth-p@users.noreply.github.com>
2025-05-05 12:23:04 -07:00
PieterCK
a228699108 slack_incoming: Use Slack text reformatters from data import.
This commit updates the Slack incoming webhook endpoint to use the same
Slack reformatting functions (`convert_to_zulip_markdown` and
`replace_links`) that are used for Slack data import and cleaning up any
duplicative functions.

This was previously not possible because the Slack reformatting regex in
`slack_message_conversion.py` could not handle these cases:

- Formatting applied to non-ASCII characters (e.g., emoji).

- Formatted strings separated by exactly one character.

- Formatted strings appearing immediately after a new line.

Fixes part of #31162.
2025-04-28 20:49:10 -07:00
PieterCK
c018911c5b slack_regex: Fix overlapping capture groups.
The Slack text regexes match specific characters before and after the
formatted string to ensure that they only match at word boundaries.

However, because the capture groups consume each matching character,
including the characters used to determine word boundaries, two
formatted strings separated by a single matching character result in one
string not being matched, as the trailing whitespace is already
consumed and cannot also match as the leading pre-match whitespace for
the next character.

Switch to a look-ahead regex for the trailing word boundary
characters. This is zero-width, and as such the next match can still
also consume the same characters.

This also fixes Slack webhook integrations'
`test_message_with_complex_formatted_mentions` which was previously
expecting false output.

Fixes part of #30827.
2025-04-28 20:49:10 -07:00
PieterCK
8992435caf slack_regex: Update Slack regex handle multiline strings.
This prep commit modifies the Slack text regex in
`slack_message_conversion.py` to use the `re.MULTILINE` flag capture
formatted strings that are adjacent to newline or end of line.

These kinds of strings are likely not uncommon to be generated by Slack
exporter itself and our Slack message block and attachment formatters
(`render_blocks` and `render_attachments`) also produces them.

This also fixes Slack webhook integration's
`test_message_with_complex_formatted_texts` which was previously
expecting false output.

Fixes part of #30827.
2025-04-28 20:49:10 -07:00
Sumit Bhanushali
facbdf08fc integrations: Handle approval/unapproval for GitLab MRs.
Fixes: #34222
2025-04-28 20:26:29 -07:00
Varun-Kolanu
4f8263cd7f integrations: Update example screenshot for JotForm.
This commit updates the screenshot for the JotForm
integration to better demonstrate its utility
in enhancing business workflows for Zulip users.
2025-04-25 15:34:00 -07:00
Varun-Kolanu
e8364d8edd integrations: Fix jotform integration to receive files.
This supports receiving files through jotform.

Fixes #32460.
2025-04-25 15:34:00 -07:00
Niloth P
14173b757f github webhook: Support all actions on discussion events.
Previously, only the action value `created` was supported.
Now, all 16 are supported.

Fixes: #26064.
2025-04-22 13:20:14 -07:00
Niloth P
22c80117f5 integrations: Add OpenSearch incoming webhook integration.
Co-authored-by: merlinz01 <158784988+merlinz01@users.noreply.github.com>
2025-04-16 14:05:29 -07:00
Varun-Kolanu
59d5d29ed8 integrations: Add support for GitLab design comments.
Fixes #26199.

Co-authored-by: Barış <barisunsalhn@users.noreply.github.com>
Co-authored-by: Satyam Bansal <sbansal1999@gmail.com>
2025-04-07 11:54:37 -07:00
Niloth P
e76ace28d2 integration-docs: Rename Jira doc to avoid collision with Jira plugin.
The Jira plugin integration doc will be moved in the next commit, to
"static/generated/integrations/jira/doc.md", as the directory name of
the integration is "jira" in zulip/python-zulip-api.

- Jira integration doc (previously) - "zerver/webhooks/jira/doc.md"
- Jira plugin integration doc (next commit) -
"static/generated/integrations/jira/doc.md"

Both of these will use the same path "jira/doc.md" as their
integration.doc value, and the actual file is loaded based on the order
of template directories listed in computed_settings.py.

Hence, use a custom path for the Jira integration doc to avoid this
collision.
2025-03-26 11:19:31 -07:00
Alex Vandiver
7db1e79133 uptimerobot: Ensure we do not use body without it being defined. 2025-03-21 09:25:17 -07:00
Prakhar Pratyush
9a46104684 addressee: Rename "(no topic)" to empty string topic.
This commit renames "(no topic)" to "" when used as
topic name, while sending or scheduling messages.

This is particularly helpful for older clients where
sending messages with empty topic input box resulted
in messages being sent to "(no topic)" topic.

Now, it will be sent in empty string topic and will
appear in the "general chat" topic.

This helps older clients to somewhat align with the UX
of the clients supporting empty string topic.
2025-03-19 11:39:28 -07:00
Niloth P
c32e6f4940 integrations: Improve the branch filtering in Git-related integrations.
- Made the branch-filtering checks uniform across all the integrations,
by adding a helper function to git.py, and re-using it.
- Instead of checking if the name of the branch that generated the
event is a substring of the "branches" parameter, we now check if
there's an exact match.
For example, if there are two branches named "main" and
"release/v1.0-main", and the user wants to track pushes to only the
"release/v1.0-main" branch, they wouldn't have been able to
previously, it will always track pushes to both branches. There was no
way to filter out the smaller named branch when there were overlaps.
2025-03-05 10:39:13 -08:00
Niloth P
b7e79715cc integration-docs: Combine two macros that are always used together.
Edited the git-append-branches.md macro to match the previous
git-branches-additional-feature.md macro, and moved it inside the
webhook-url-with-bot-email.md macro, as it's only ever used
immediately after that macro.
2025-03-05 10:39:13 -08:00
Niloth P
8f564b2053 integration-docs: Update branch filtering instructions.
Updated the Git-related integrations that support branch filtering:
- Removed the branch-filtering configuration option, and its macro.
- Added a new macro that integrates the branch-filtering instruction
with the Generate-URL step.

The new macro `generate-webhook-url-with-branch-filtering` builds off of
the `generate-webhook-url-basic` macro, adding only the branch filtering
instruction. But, it does not re-use the macro, instead duplicates it,
to avoid the newline break that would be added otherwise.
2025-03-05 10:39:13 -08:00
Niloth P
0df3dcdde9 integration-docs: Remove unnecessary instruction from Wekan doc.
A branch filtering instruction that has nothing to do with Wekan has
been present in the Wekan doc since the addition of the integration.
2025-03-05 10:39:13 -08:00
Alya Abbott
61db2bc158 integrations: Update GitHub intergation for new configuration UI. 2025-02-28 13:04:42 -08:00
Aditya Kumar Kasaudhan
18d83534ff github: Include old issue number in transfer message for new repo.
This commit updates the GitHub webhook integration to include the
old issue number in the transfer message sent for the new repository,
alongside the old repository's full name.
2025-02-27 09:22:15 -08:00
Anders Kaseorg
d7556b4060 requirements: Migrate to uv.
https://docs.astral.sh/uv/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-24 22:29:24 -08:00
Aditya Kumar Kasaudhan
9d08063208 webhooks/github: Added support for issue transferred events.
On transferring an issue to another repository, GitHub sends
- a "transferred" event to the old repository's webhook URL,
- and an "opened event", containing links to the old issue,
  to the new repository's webhook URL.

This commit adds support for both events independently.
Fixes: #33450.
2025-02-21 15:34:14 -08:00
Anders Kaseorg
778a45d41e slack_incoming: Fix slack_error_handler typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Alex Vandiver
a7d513e5ec users: Remove unnecessary get_api_key helper.
Using the column name is clearer.
2025-02-13 12:40:53 -08:00
Niloth P
51839a72b9 HomeAssistant: Convert image instructions to code blocks.
Renamed the example screenshot to default image name as well.
2025-02-01 15:38:46 -08:00
Niloth P
fa0ea2aa2d webhooks: Remove second example screenshot from Sentry and Teamcity. 2025-02-01 15:38:46 -08:00
Niloth P
74d730f464 webhooks: Rename example screenshot images to match the default name.
The integrations - GoSquared, Greenhouse, OpsGenie and Zendesk - have
been using `000.png` as their example screenshots, renamed them to
match the default name `001.png`, to avoid passing them as arguments.
2025-02-01 15:38:46 -08:00
Niloth P
636f4f457c integration-docs: Remove context property recommended_channel_name.
The context property was previously being used in the macro
`git-webhook-url-with-branches` which has been removed as it is not in
use any longer.

The context property was now being used only in 2 integration docs, both
of which used it only in a single location, and directly used their own
names as the channel name. Making the context property unnecessary.
2025-01-30 11:59:38 -08:00