Go to file
Zixuan James Li 268f858f39 linkifier: Support URL templates for linkifiers.
This swaps out url_format_string from all of our APIs and replaces it
with url_template. Note that the documentation changes in the following
commits  will be squashed with this commit.

We change the "url_format" key to "url_template" for the
realm_linkifiers events in event_schema, along with updating
LinkifierDict. "url_template" is the name chosen to normalize
mixed usages of "url_format_string" and "url_format" throughout
the backend.

The markdown processor is updated to stop handling the format string
interpolation and delegate the task template expansion to the uri_template
library instead.

This change affects many test cases. We mostly just replace "%(name)s"
with "{name}", "url_format_string" with "url_template" to make sure that
they still pass. There are some test cases dedicated for testing "%"
escaping, which aren't relevant anymore and are subject to removal.
But for now we keep most of them as-is, and make sure that "%" is always
escaped since we do not use it for variable substitution any more.

Since url_format_string is not populated anymore, a migration is created
to remove this field entirely, and make url_template non-nullable since
we will always populate it. Note that it is possible to have
url_template being null after migration 0422 and before 0424, but
in practice, url_template will not be None after backfilling and the
backend now is always setting url_template.

With the removal of url_format_string, RealmFilter model will now be cleaned
with URL template checks, and the old checks for escapes are removed.

We also modified RealmFilter.clean to skip the validation when the
url_template is invalid. This avoids raising mulitple ValidationError's
when calling full_clean on a linkifier. But we might eventually want to
have a more centric approach to data validation instead of having
the same validation in both the clean method and the validator.

Fixes #23124.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-04-19 12:20:49 -07:00
.github ci: Enable XML coverage report to fix Codecov uploads. 2023-03-31 15:51:43 -07:00
.tx provision: Replace transifex-client with new transifex-cli. 2022-12-13 12:34:08 -08:00
.vscode vscode: Recommend remote development extension. 2021-11-03 16:03:46 -07:00
analytics support: Add option to upgrade an org to Plus plan on /activity/support. 2023-04-10 17:32:45 -07:00
api_docs linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
confirmation ruff: Fix DJ012 Order of model's inner classes, methods, and fields. 2023-04-12 17:32:38 -07:00
corporate billing: Allow exempt_from_license_number_check any number of licenses. 2023-04-13 15:26:44 -07:00
docs blueslip: Only show in dev mode, or report to Sentry. 2023-04-13 14:59:58 -07:00
help linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
locale i18n: Update translation data from Transifex. 2023-03-15 15:57:26 -07:00
pgroonga migrations: Import BaseDatabaseSchemaEditor from its canonical module. 2023-03-05 14:46:28 -08:00
puppet puppet: Move logrotate config into app_frontend_base. 2023-04-19 09:34:37 -07:00
requirements requirements: Add uri-template. 2023-04-19 12:20:49 -07:00
scripts zulip-puppet-apply: Any resources failing to apply should exit 2. 2023-04-19 09:35:19 -07:00
static email: Rewrite followup_day2 email. 2023-04-10 17:44:18 -07:00
stubs/taint actions: Split out zerver.actions.message_send. 2022-04-14 17:14:34 -07:00
templates emails: Remove compiled from .gitignore. 2023-04-18 13:25:52 -07:00
tools linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
var/puppeteer puppeteer_tests: Port to TypeScript. 2021-02-22 16:03:10 -08:00
web linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
zerver linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
zilencer zilencer: Delete duplicate remote push registrations. 2023-04-13 15:17:20 -07:00
zproject urls: Move jwt_fetch_api_key endpoint to v1_api_mobile_patterns. 2023-04-18 15:44:31 -07:00
.codecov.yml
.codespellignore codespell: Fix newly found typos. 2023-04-03 22:39:21 -07:00
.editorconfig editorconfig: Restore indent_size = 2 for Markdown. 2021-08-20 23:14:37 -07:00
.eslintignore web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
.eslintrc.json eslint: Loosen no-use-before-define for TS like we do for JS. 2023-03-25 09:40:57 -07:00
.gitattributes .gitattributes: Mark *.bmp, *.bson, *.mp3, *.pdf as binary. 2022-02-07 18:51:06 -08:00
.gitignore dependencies: Switch to pnpm. 2023-03-20 15:48:29 -07:00
.gitlint gitlint-rules: Rename to gitlint_rules. 2023-03-03 18:02:38 -08:00
.mailmap mailmap: Add entry for rht. 2022-11-17 00:05:17 -08:00
.npmignore
.npmrc dependencies: Switch to pnpm. 2023-03-20 15:48:29 -07:00
.prettierignore dependencies: Switch to pnpm. 2023-03-20 15:48:29 -07:00
.pyre_configuration pysa: Update .pyre_configuration to point to typeshed. 2020-09-22 15:44:47 -07:00
.readthedocs.yaml readthedocs: Add a configuration file. 2023-02-03 16:36:54 -08:00
.sonarcloud.properties
CODE_OF_CONDUCT.md contributor docs: Add guidelines on moderating the Zulip community. 2022-12-02 16:57:41 -08:00
CONTRIBUTING.md docs: Remove paragraph about getting help finding issues in contributing. 2023-01-17 14:51:53 -08:00
Dockerfile-postgresql docker: Document the PostgreSQL Dockerfile build steps. 2022-04-26 18:00:00 -07:00
LICENSE license: Move copyright notice from LICENSE to NOTICE. 2021-02-05 09:28:12 -08:00
NOTICE docs: Bump copyright year. 2021-02-05 09:28:15 -08:00
README.md README: Update Ruff badge. 2023-03-21 11:46:20 -07:00
SECURITY.md SECURITY.md: Reorder and make clearer how to subscribe to announcements. 2022-01-07 15:56:26 -08:00
Vagrantfile vagrant: Add Fedora 36 support. 2022-09-08 16:12:59 -07:00
manage.py ruff: Fix SIM102 nested `if` statements. 2023-01-23 11:18:36 -08:00
package.json linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
pnpm-lock.yaml linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00
prettier.config.js prettier: Disable embedded language formatting for Markdown. 2021-08-20 23:14:37 -07:00
pyproject.toml report_error: Remove API endpoint for client error reporting. 2023-04-13 14:59:58 -07:00
stylelint.config.js web: Use `uri` instead of `url`. 2023-04-10 10:26:48 -07:00
tsconfig.json ts: Convert `emoji.js` to TypeScript. 2023-04-05 10:29:01 -07:00
version.py linkifier: Support URL templates for linkifiers. 2023-04-19 12:20:49 -07:00

README.md

Zulip overview

Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.

Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.

Come find us on the development community chat!

GitHub Actions build status coverage status Mypy coverage Ruff code style: black code style: prettier GitHub release docs Zulip chat Twitter GitHub Sponsors

Getting started

You may also be interested in reading our blog, and following us on Twitter and LinkedIn.

Zulip is distributed under the Apache 2.0 license.