2021-06-03 16:20:40 +00:00
# Contributing
2021-08-31 10:29:27 +00:00
This document aims to get you started with contributing to Synapse!
# 1. Who can contribute to Synapse?
2024-01-03 11:31:03 +00:00
Everyone is welcome to contribute code to
[Synapse ](https://github.com/element-hq/synapse ), provided that they are willing
to license their contributions to Element under a [Contributor License
Agreement](https://cla-assistant.io/element-hq/synapse) (CLA). This ensures that
their contribution will be made available under an OSI-approved open-source
license, currently Affero General Public License v3 (AGPLv3).
2023-11-20 19:22:46 +00:00
2024-01-03 11:31:03 +00:00
Please see the
[Element blog post ](https://element.io/blog/synapse-now-lives-at-github-com-element-hq-synapse/ )
for the full rationale.
2021-08-31 10:29:27 +00:00
# 2. What do I need?
2021-10-29 13:03:58 +00:00
If you are running Windows, the Windows Subsystem for Linux (WSL) is strongly
recommended for development. More information about WSL can be found at
< https: / / docs . microsoft . com / en-us / windows / wsl / install > . Running Synapse natively
on Windows is not officially supported.
2022-01-13 16:33:37 +00:00
The code of Synapse is written in Python 3. To do pretty much anything, you'll need [a recent version of Python 3 ](https://www.python.org/downloads/ ). Your Python also needs support for [virtual environments ](https://docs.python.org/3/library/venv.html ). This is usually built-in, but some Linux distributions like Debian and Ubuntu split it out into its own package. Running `sudo apt install python3-venv` should be enough.
2023-05-26 17:28:04 +00:00
A recent version of the Rust compiler is needed to build the native modules. The
easiest way of installing the latest version is to use [rustup ](https://rustup.rs/ ).
2022-01-13 16:33:37 +00:00
Synapse can connect to PostgreSQL via the [psycopg2 ](https://pypi.org/project/psycopg2/ ) Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with `sudo apt install libpq-dev` .
2021-08-31 10:29:27 +00:00
2022-12-20 16:06:26 +00:00
Synapse has an optional, improved user search with better Unicode support. For that you need the development package of `libicu` . On Debian or Ubuntu Linux, this can be installed with `sudo apt install libicu-dev` .
2021-08-31 10:29:27 +00:00
The source code of Synapse is hosted on GitHub. You will also need [a recent version of git ](https://github.com/git-guides/install-git ).
For some tests, you will need [a recent version of Docker ](https://docs.docker.com/get-docker/ ).
# 3. Get the source.
The preferred and easiest way to contribute changes is to fork the relevant
project on GitHub, and then [create a pull request](
https://help.github.com/articles/using-pull-requests/) to ask us to pull your
changes into our repo.
Please base your changes on the `develop` branch.
```sh
git clone git@github.com:YOUR_GITHUB_USER_NAME/synapse.git
git checkout develop
```
If you need help getting started with git, this is beyond the scope of the document, but you
can find many good git tutorials on the web.
# 4. Install the dependencies
2023-05-26 17:28:04 +00:00
Before installing the Python dependencies, make sure you have installed a recent version
of Rust (see the "What do I need?" section above). The easiest way of installing the
latest version is to use [rustup ](https://rustup.rs/ ).
2022-04-20 14:18:21 +00:00
Synapse uses the [poetry ](https://python-poetry.org/ ) project to manage its dependencies
and development environment. Once you have installed Python 3 and added the
source, you should install `poetry` .
Of their installation methods, we recommend
[installing `poetry` using `pipx` ](https://python-poetry.org/docs/#installing-with-pipx ),
```shell
pip install --user pipx
2023-11-27 15:16:20 +00:00
pipx install poetry==1.5.1 # Problems with Poetry 1.6, see https://github.com/matrix-org/synapse/issues/16147
2022-04-20 14:18:21 +00:00
```
but see poetry's [installation instructions ](https://python-poetry.org/docs/#installation )
for other installation methods.
2023-01-17 18:04:44 +00:00
Developing Synapse requires Poetry version 1.3.2 or later.
2022-09-02 13:20:03 +00:00
2022-04-20 14:18:21 +00:00
Next, open a terminal and install dependencies as follows:
2021-08-31 10:29:27 +00:00
```sh
cd path/where/you/have/cloned/the/repository
2022-04-20 14:18:21 +00:00
poetry install --extras all
2021-08-31 10:29:27 +00:00
```
2023-05-26 17:28:04 +00:00
This will install the runtime and developer dependencies for the project. Be sure to check
that the `poetry install` step completed cleanly.
2021-08-31 10:29:27 +00:00
2023-02-08 12:58:36 +00:00
## Running Synapse via poetry
To start a local instance of Synapse in the locked poetry environment, create a config file:
```sh
cp docs/sample_config.yaml homeserver.yaml
2023-05-26 17:28:04 +00:00
cp docs/sample_log_config.yaml log_config.yaml
2023-02-08 12:58:36 +00:00
```
2023-05-26 17:28:04 +00:00
Now edit `homeserver.yaml` , things you might want to change include:
- Set a `server_name`
- Adjusting paths to be correct for your system like the `log_config` to point to the log config you just copied
2023-11-20 19:22:46 +00:00
- Using a [PostgreSQL database instead of SQLite ](https://vector-im.github.io/synapse/latest/usage/configuration/config_documentation.html#database )
- Adding a [`registration_shared_secret` ](https://vector-im.github.io/synapse/latest/usage/configuration/config_documentation.html#registration_shared_secret ) so you can use [`register_new_matrix_user` command ](https://vector-im.github.io/synapse/latest/setup/installation.html#registering-a-user ).
2023-05-26 17:28:04 +00:00
And then run Synapse with the following command:
2023-02-08 12:58:36 +00:00
```sh
poetry run python -m synapse.app.homeserver -c homeserver.yaml
```
2021-08-31 10:29:27 +00:00
2023-05-26 17:28:04 +00:00
If you get an error like the following:
```
importlib.metadata.PackageNotFoundError: matrix-synapse
```
this probably indicates that the `poetry install` step did not complete cleanly - go back and
resolve any issues and re-run until successful.
2021-08-31 10:29:27 +00:00
# 5. Get in touch.
2021-10-06 17:09:35 +00:00
Join our developer community on Matrix: [#synapse-dev:matrix.org ](https://matrix.to/#/#synapse-dev:matrix.org )!
2021-08-31 10:29:27 +00:00
# 6. Pick an issue.
2023-11-20 19:22:46 +00:00
Fix your favorite problem or perhaps find a [Good First Issue ](https://github.com/element-hq/synapse/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22 )
2021-08-31 10:29:27 +00:00
to work on.
# 7. Turn coffee into code and documentation!
There is a growing amount of documentation located in the
2023-11-20 19:22:46 +00:00
[`docs` ](https://github.com/element-hq/synapse/tree/develop/docs )
directory, with a rendered version [available online ](https://vector-im.github.io/synapse ).
2021-08-31 10:29:27 +00:00
This documentation is intended primarily for sysadmins running their
own Synapse instance, as well as developers interacting externally with
Synapse.
2023-11-20 19:22:46 +00:00
[`docs/development` ](https://github.com/element-hq/synapse/tree/develop/docs/development )
2021-08-31 10:29:27 +00:00
exists primarily to house documentation for
Synapse developers.
2023-11-20 19:22:46 +00:00
[`docs/admin_api` ](https://github.com/element-hq/synapse/tree/develop/docs/admin_api ) houses documentation
2021-08-31 10:29:27 +00:00
regarding Synapse's Admin API, which is used mostly by sysadmins and external
service developers.
Synapse's code style is documented [here ](../code_style.md ). Please follow
2023-01-05 18:18:00 +00:00
it, including the conventions for [configuration
options and documentation](../code_style.md#configuration-code-and-documentation-format).
2021-08-31 10:29:27 +00:00
We welcome improvements and additions to our documentation itself! When
writing new pages, please
2023-11-20 19:22:46 +00:00
[build `docs` to a book ](https://github.com/element-hq/synapse/tree/develop/docs#adding-to-the-documentation )
2021-08-31 10:29:27 +00:00
to check that your contributions render correctly. The docs are written in
[GitHub-Flavoured Markdown ](https://guides.github.com/features/mastering-markdown/ ).
2022-09-06 18:01:37 +00:00
When changes are made to any Rust code then you must call either `poetry install`
or `maturin develop` (if installed) to rebuild the Rust code. Using [`maturin` ](https://github.com/PyO3/maturin )
is quicker than `poetry install` , so is recommended when making frequent
changes to the Rust code.
2021-08-31 10:29:27 +00:00
# 8. Test, test, test!
2023-01-05 18:18:00 +00:00
< a name = "test-test-test" id = "test-test-test" > < / a >
2021-08-31 10:29:27 +00:00
While you're developing and before submitting a patch, you'll
want to test your code.
## Run the linters.
The linters look at your code and do two things:
- ensure that your code follows the coding style adopted by the project;
- catch a number of errors in your code.
2022-04-20 14:18:21 +00:00
The linter takes no time at all to run as soon as you've [downloaded the dependencies ](#4-install-the-dependencies ).
2021-08-31 10:29:27 +00:00
```sh
2022-04-20 14:18:21 +00:00
poetry run ./scripts-dev/lint.sh
2021-08-31 10:29:27 +00:00
```
Note that this script *will modify your files* to fix styling errors.
Make sure that you have saved all your files.
If you wish to restrict the linters to only the files changed since the last commit
(much faster!), you can instead run:
```sh
2022-04-20 14:18:21 +00:00
poetry run ./scripts-dev/lint.sh -d
2021-08-31 10:29:27 +00:00
```
Or if you know exactly which files you wish to lint, you can instead run:
```sh
2022-04-20 14:18:21 +00:00
poetry run ./scripts-dev/lint.sh path/to/file1.py path/to/file2.py path/to/folder
2021-08-31 10:29:27 +00:00
```
## Run the unit tests (Twisted trial).
The unit tests run parts of Synapse, including your changes, to see if anything
was broken. They are slower than the linters but will typically catch more errors.
```sh
2022-04-20 14:18:21 +00:00
poetry run trial tests
2021-08-31 10:29:27 +00:00
```
2022-09-28 11:14:35 +00:00
You can run unit tests in parallel by specifying `-jX` argument to `trial` where `X` is the number of parallel runners you want. To use 4 cpu cores, you would run them like:
```sh
poetry run trial -j4 tests
```
2021-08-31 10:29:27 +00:00
If you wish to only run *some* unit tests, you may specify
another module instead of `tests` - or a test class or a method:
```sh
2022-04-20 14:18:21 +00:00
poetry run trial tests.rest.admin.test_room tests.handlers.test_admin.ExfiltrateData.test_invite
2021-08-31 10:29:27 +00:00
```
If your tests fail, you may wish to look at the logs (the default log level is `ERROR` ):
```sh
less _trial_temp/test.log
```
To increase the log level for the tests, set `SYNAPSE_TEST_LOG_LEVEL` :
```sh
2022-04-20 14:18:21 +00:00
SYNAPSE_TEST_LOG_LEVEL=DEBUG poetry run trial tests
2021-08-31 10:29:27 +00:00
```
2022-01-10 17:06:42 +00:00
By default, tests will use an in-memory SQLite database for test data. For additional
help with debugging, one can use an on-disk SQLite database file instead, in order to
review database state during and after running tests. This can be done by setting
the `SYNAPSE_TEST_PERSIST_SQLITE_DB` environment variable. Doing so will cause the
database state to be stored in a file named `test.db` under the trial process'
working directory. Typically, this ends up being `_trial_temp/test.db` . For example:
```sh
2022-04-20 14:18:21 +00:00
SYNAPSE_TEST_PERSIST_SQLITE_DB=1 poetry run trial tests
2022-01-10 17:06:42 +00:00
```
The database file can then be inspected with:
```sh
sqlite3 _trial_temp/test.db
```
2022-09-06 18:01:37 +00:00
Note that the database file is cleared at the beginning of each test run. Thus it
2022-01-10 17:06:42 +00:00
will always only contain the data generated by the *last run test* . Though generally
when debugging, one is only running a single test anyway.
2021-09-24 14:27:09 +00:00
### Running tests under PostgreSQL
Invoking `trial` as above will use an in-memory SQLite database. This is great for
quick development and testing. However, we recommend using a PostgreSQL database
in production (and indeed, we have some code paths specific to each database).
This means that we need to run our unit tests against PostgreSQL too. Our CI does
this automatically for pull requests and release candidates, but it's sometimes
useful to reproduce this locally.
2022-05-17 18:05:53 +00:00
#### Using Docker
The easiest way to do so is to run Postgres via a docker container. In one
terminal:
```shell
2023-09-08 13:47:36 +00:00
docker run --rm -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=postgres -e POSTGRES_DB=postgres -p 5432:5432 postgres:14
2022-05-17 18:05:53 +00:00
```
If you see an error like
```
docker: Error response from daemon: driver failed programming external connectivity on endpoint nice_ride (b57bbe2e251b70015518d00c9981e8cb8346b5c785250341a6c53e3c899875f1): Error starting userland proxy: listen tcp4 0.0.0.0:5432: bind: address already in use.
```
then something is already bound to port 5432. You're probably already running postgres locally.
Once you have a postgres server running, invoke `trial` in a second terminal:
```shell
SYNAPSE_POSTGRES=1 SYNAPSE_POSTGRES_HOST=127.0.0.1 SYNAPSE_POSTGRES_USER=postgres SYNAPSE_POSTGRES_PASSWORD=mysecretpassword poetry run trial tests
````
#### Using an existing Postgres installation
If you have postgres already installed on your system, you can run `trial` with the
2021-09-24 14:27:09 +00:00
following environment variables matching your configuration:
- `SYNAPSE_POSTGRES` to anything nonempty
2022-04-05 11:44:48 +00:00
- `SYNAPSE_POSTGRES_HOST` (optional if it's the default: UNIX socket)
- `SYNAPSE_POSTGRES_PORT` (optional if it's the default: 5432)
- `SYNAPSE_POSTGRES_USER` (optional if using a UNIX socket)
- `SYNAPSE_POSTGRES_PASSWORD` (optional if using a UNIX socket)
2021-09-24 14:27:09 +00:00
For example:
```shell
export SYNAPSE_POSTGRES=1
export SYNAPSE_POSTGRES_HOST=localhost
export SYNAPSE_POSTGRES_USER=postgres
export SYNAPSE_POSTGRES_PASSWORD=mydevenvpassword
trial
```
2022-04-05 11:44:48 +00:00
You don't need to specify the host, user, port or password if your Postgres
server is set to authenticate you over the UNIX socket (i.e. if the `psql` command
works without further arguments).
2022-05-17 18:05:53 +00:00
Your Postgres account needs to be able to create databases; see the postgres
docs for [`ALTER ROLE` ](https://www.postgresql.org/docs/current/sql-alterrole.html ).
2022-04-05 11:44:48 +00:00
2021-08-31 10:29:27 +00:00
## Run the integration tests ([Sytest](https://github.com/matrix-org/sytest)).
The integration tests are a more comprehensive suite of tests. They
run a full version of Synapse, including your changes, to check if
anything was broken. They are slower than the unit tests but will
typically catch more errors.
The following command will let you run the integration test with the most common
configuration:
```sh
2023-07-10 17:39:36 +00:00
$ docker run --rm -it -v /path/where/you/have/cloned/the/repository\:/src:ro -v /path/to/where/you/want/logs\:/logs matrixdotorg/sytest-synapse:focal
2021-08-31 10:29:27 +00:00
```
2022-03-30 12:55:05 +00:00
(Note that the paths must be full paths! You could also write `$(realpath relative/path)` if needed.)
2021-08-31 10:29:27 +00:00
2022-03-30 12:55:05 +00:00
This configuration should generally cover your needs.
- To run with Postgres, supply the `-e POSTGRES=1 -e MULTI_POSTGRES=1` environment flags.
- To run with Synapse in worker mode, supply the `-e WORKERS=1 -e REDIS=1` environment flags (in addition to the Postgres flags).
2023-11-20 19:22:46 +00:00
For more details about other configurations, see the [Docker-specific documentation in the SyTest repo ](https://github.com/vector-im/sytest/blob/develop/docker/README.md ).
2021-08-31 10:29:27 +00:00
## Run the integration tests ([Complement](https://github.com/matrix-org/complement)).
[Complement ](https://github.com/matrix-org/complement ) is a suite of black box tests that can be run on any homeserver implementation. It can also be thought of as end-to-end (e2e) tests.
It's often nice to develop on Synapse and write Complement tests at the same time.
Here is how to run your local Synapse checkout against your local Complement checkout.
(checkout [`complement` ](https://github.com/matrix-org/complement ) alongside your `synapse` checkout)
```sh
COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh
```
To run a specific test file, you can pass the test name at the end of the command. The name passed comes from the naming structure in your Complement tests. If you're unsure of the name, you can do a full run and copy it from the test output:
```sh
2022-05-09 09:38:32 +00:00
COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh -run TestImportHistoricalMessages
2021-08-31 10:29:27 +00:00
```
To run a specific test, you can specify the whole name structure:
```sh
2022-05-09 09:38:32 +00:00
COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh -run TestImportHistoricalMessages/parallel/Historical_events_resolve_in_the_correct_order
2021-08-31 10:29:27 +00:00
```
2022-06-08 09:57:05 +00:00
The above will run a monolithic (single-process) Synapse with SQLite as the database. For other configurations, try:
- Passing `POSTGRES=1` as an environment variable to use the Postgres database instead.
- Passing `WORKERS=1` as an environment variable to use a workerised setup instead. This option implies the use of Postgres.
2022-11-08 12:34:09 +00:00
- If setting `WORKERS=1` , optionally set `WORKER_TYPES=` to declare which worker
types you wish to test. A simple comma-delimited string containing the worker types
defined from the `WORKERS_CONFIG` template in
2023-11-20 19:22:46 +00:00
[here ](https://github.com/element-hq/synapse/blob/develop/docker/configure_workers_and_start.py#L54 ).
2022-11-08 12:34:09 +00:00
A safe example would be `WORKER_TYPES="federation_inbound, federation_sender, synchrotron"` .
See the [worker documentation ](../workers.md ) for additional information on workers.
2023-02-01 23:42:45 +00:00
- Passing `ASYNCIO_REACTOR=1` as an environment variable to use the Twisted asyncio reactor instead of the default one.
2023-05-05 12:27:51 +00:00
- Passing `PODMAN=1` will use the [podman ](https://podman.io/ ) container runtime, instead of docker.
2023-07-11 18:08:06 +00:00
- Passing `UNIX_SOCKETS=1` will utilise Unix socket functionality for Synapse, Redis, and Postgres(when applicable).
2022-06-08 09:57:05 +00:00
2022-07-05 09:46:20 +00:00
To increase the log level for the tests, set `SYNAPSE_TEST_LOG_LEVEL` , e.g:
```sh
SYNAPSE_TEST_LOG_LEVEL=DEBUG COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh -run TestImportHistoricalMessages
```
2021-08-31 10:29:27 +00:00
2022-06-16 09:31:10 +00:00
### Prettier formatting with `gotestfmt`
If you want to format the output of the tests the same way as it looks in CI,
2022-10-11 17:54:06 +00:00
install [gotestfmt ](https://github.com/GoTestTools/gotestfmt ).
2022-06-16 09:31:10 +00:00
You can then use this incantation to format the tests appropriately:
```sh
COMPLEMENT_DIR=../complement ./scripts-dev/complement.sh -json | gotestfmt -hide successful-tests
```
(Remove `-hide successful-tests` if you don't want to hide successful tests.)
2021-08-31 10:29:27 +00:00
### Access database for homeserver after Complement test runs.
If you're curious what the database looks like after you run some tests, here are some steps to get you going in Synapse:
1. In your Complement test comment out `defer deployment.Destroy(t)` and replace with `defer time.Sleep(2 * time.Hour)` to keep the homeserver running after the tests complete
1. Start the Complement tests
1. Find the name of the container, `docker ps -f name=complement_` (this will filter for just the Compelement related Docker containers)
1. Access the container replacing the name with what you found in the previous step: `docker exec -it complement_1_hs_with_application_service.hs1_2 /bin/bash`
1. Install sqlite (database driver), `apt-get update && apt-get install -y sqlite3`
1. Then run `sqlite3` and open the database `.open /conf/homeserver.db` (this db path comes from the Synapse homeserver.yaml)
# 9. Submit your patch.
Once you're happy with your patch, it's time to prepare a Pull Request.
To prepare a Pull Request, please:
1. verify that [all the tests pass ](#test-test-test ), including the coding style;
2. [sign off ](#sign-off ) your contribution;
3. `git push` your commit to your fork of Synapse;
4. on GitHub, [create the Pull Request ](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request );
5. add a [changelog entry ](#changelog ) and push it to your Pull Request;
2022-07-06 11:30:58 +00:00
6. that's it for now, a non-draft pull request will automatically request review from the team;
2021-08-31 10:29:27 +00:00
7. if you need to update your PR, please avoid rebasing and just add new commits to your branch.
## Changelog
All changes, even minor ones, need a corresponding changelog / newsfragment
2023-01-09 16:33:49 +00:00
entry. These are managed by [Towncrier ](https://github.com/twisted/towncrier ).
2021-08-31 10:29:27 +00:00
To create a changelog entry, make a new file in the `changelog.d` directory named
in the format of `PRnumber.type` . The type can be one of the following:
* `feature`
* `bugfix`
* `docker` (for updates to the Docker image)
* `doc` (for updates to the documentation)
* `removal` (also used for deprecations)
* `misc` (for internal-only changes)
This file will become part of our [changelog](
2023-11-20 19:22:46 +00:00
https://github.com/element-hq/synapse/blob/master/CHANGES.md) at the next
2021-08-31 10:29:27 +00:00
release, so the content of the file should be a short description of your
change in the same style as the rest of the changelog. The file can contain Markdown
2022-10-06 17:11:32 +00:00
formatting, and must end with a full stop (.) or an exclamation mark (!) for
2021-08-31 10:29:27 +00:00
consistency.
Adding credits to the changelog is encouraged, we value your
contributions and would like to have you shouted out in the release notes!
For example, a fix in PR #1234 would have its changelog entry in
`changelog.d/1234.bugfix` , and contain content like:
> The security levels of Florbs are now validated when received
> via the `/federation/florb` endpoint. Contributed by Jane Matrix.
If there are multiple pull requests involved in a single bugfix/feature/etc,
then the content for each `changelog.d` file should be the same. Towncrier will
merge the matching files together into a single changelog entry when we come to
release.
### How do I know what to call the changelog file before I create the PR?
Obviously, you don't know if you should call your newsfile
`1234.bugfix` or `5678.bugfix` until you create the PR, which leads to a
chicken-and-egg problem.
There are two options for solving this:
1. Open the PR without a changelog file, see what number you got, and *then*
2023-01-05 18:18:00 +00:00
add the changelog file to your branch, or:
2021-08-31 10:29:27 +00:00
1. Look at the [list of all
2023-11-20 19:22:46 +00:00
issues/PRs](https://github.com/element-hq/synapse/issues?q=), add one to the
2021-08-31 10:29:27 +00:00
highest number you see, and quickly open the PR before somebody else claims
your number.
[This
script](https://github.com/richvdh/scripts/blob/master/next_github_number.sh)
might be helpful if you find yourself doing this a lot.
Sorry, we know it's a bit fiddly, but it's *really* helpful for us when we come
to put together a release!
### Debian changelog
Changes which affect the debian packaging files (in `debian` ) are an
exception to the rule that all changes require a `changelog.d` file.
In this case, you will need to add an entry to the debian changelog for the
next release. For this, run the following command:
```
dch
```
This will make up a new version number (if there isn't already an unreleased
version in flight), and open an editor where you can add a new changelog entry.
(Our release process will ensure that the version number and maintainer name is
corrected for the release.)
If your change affects both the debian packaging *and* files outside the debian
directory, you will need both a regular newsfragment *and* an entry in the
debian changelog. (Though typically such changes should be submitted as two
separate pull requests.)
## Sign off
2024-01-03 11:31:03 +00:00
After you make a PR a comment from @CLAassistant will appear asking you to sign
the [CLA ](https://cla-assistant.io/element-hq/synapse ).
This will link a page to allow you to confirm that you have read and agreed to
the CLA by signing in with GitHub.
2021-08-31 10:29:27 +00:00
2024-01-03 11:31:03 +00:00
Alternatively, you can sign off before opening a PR by going to
< https: / / cla-assistant . io / element-hq / synapse > .
2021-08-31 10:29:27 +00:00
We accept contributions under a legally identifiable name, such as
your name on government documentation or common-law names (names
claimed by legitimate usage or repute). Unfortunately, we cannot
accept anonymous contributions at this time.
# 10. Turn feedback into better code.
Once the Pull Request is opened, you will see a few things:
1. our automated CI (Continuous Integration) pipeline will run (again) the linters, the unit tests, the integration tests and more;
2. one or more of the developers will take a look at your Pull Request and offer feedback.
From this point, you should:
1. Look at the results of the CI pipeline.
- If there is any error, fix the error.
2. If a developer has requested changes, make these changes and let us know if it is ready for a developer to review again.
2022-07-06 11:30:58 +00:00
- A pull request is a conversation, if you disagree with the suggestions, please respond and discuss it.
2021-08-31 10:29:27 +00:00
3. Create a new commit with the changes.
- Please do NOT overwrite the history. New commits make the reviewer's life easier.
- Push this commits to your Pull Request.
4. Back to 1.
2022-07-06 11:30:58 +00:00
5. Once the pull request is ready for review again please re-request review from whichever developer did your initial
review (or leave a comment in the pull request that you believe all required changes have been done).
2021-08-31 10:29:27 +00:00
Once both the CI and the developers are happy, the patch will be merged into Synapse and released shortly!
# 11. Find a new issue.
By now, you know the drill!
# Notes for maintainers on merging PRs etc
There are some notes for those with commit access to the project on how we
manage git [here ](git.md ).
# Conclusion
That's it! Matrix is a very open and collaborative project as you might expect
given our obsession with open communication. If we're going to successfully
matrix together all the fragmented communication technologies out there we are
reliant on contributions and collaboration from the community to do so. So
please get involved - and we hope you have as much fun hacking on Matrix as we
do!