hookshot/README.md

67 lines
2.5 KiB
Markdown
Raw Normal View History

2021-11-22 16:02:07 +00:00
matrix-hookshot
2019-08-02 19:15:33 +01:00
=============
2021-11-22 16:02:07 +00:00
*Previously matrix-github*
2021-11-22 16:51:56 +00:00
[![#hookshot:half-shot.uk](https://img.shields.io/matrix/github-bridge:half-shot.uk.svg?server_fqdn=chaotic.half-shot.uk&label=%23hookshot:half-shot.uk&logo=matrix)](https://matrix.to/#/#hookshot:half-shot.uk)
2021-11-22 16:50:16 +00:00
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/halfshot/matrix-hookshot)](https://hub.docker.com/r/halfshot/matrix-hookshot)
2019-08-07 18:56:50 +01:00
This bridge enables users to join Github issues and PRs through Matrix and collaborate using rooms.
## Setup
2021-11-21 13:21:37 +00:00
This bridge requires at least Node 12, and Rust installed. If you do not have rust, https://rustup.rs/ is the quickest way to get it.
2019-08-07 18:56:50 +01:00
To set up the bridge, simply clone this repository.
2021-11-22 16:02:07 +00:00
` git clone git@github.com:Half-Shot/matrix-hookshot.git`
2019-08-07 18:56:50 +01:00
2021-11-21 13:21:37 +00:00
then you will need to install the dependencies
2019-08-07 18:56:50 +01:00
2021-11-21 13:21:58 +00:00
```sh
2021-11-22 16:02:07 +00:00
cd matrix-hookshot
2021-11-21 13:21:58 +00:00
yarn
2019-08-07 18:56:50 +01:00
```
Then you will need to copy the `config.sample.yml` to a new file called `config.yml`. You should fill this in. Pay **close** attention to settings like `passkey` which are required for the bridge to function.
For the GitHub tokens, you will need to create a new [GitHub App](https://github.com/settings/apps/new)
You will need to allow access to your bridge instance via a public URL, and fill in the Webhook URL option on GitHub. You will need to also generate a secret key which can be anything, but should be long and unique.
Additionally, you will need to setup some permissions in "Permissions & events".
Largely, these need to be:
2019-08-08 15:37:48 +01:00
- Repository contents: "Read & Write"
- Issues: "Read & Write"
- Pull-requests: "Read & Write"
2019-08-07 18:56:50 +01:00
You will also need to subscribe to, at a minimum:
- Issues
- Label
- Issue comment
- Pull request
- Pull request review
- Pull request review comment
Once that is setup, you will need to create a registration file for the bridge. Copy `registration.sample.yml` into `registration.yml` and fill in. You are nearly done! Copy or link the registration.yml file to your homeserver in some way, and reconfigure your homeserver to use it. Ensure you have restarted your homeserver if needed (Synapse needs this).
## Running
You can run `npm run start:app` to start the app.
## Running in multi-process mode.
If you are running as a non-monolith, then you should also run `npm run start:webhooks`. In the case of the latter, ensure a Redis instance is running.
You can quickly setup a redis by either installing it from your system package manager, or just running
`docker run --name github-bridge-redis -p 6379:6379 -d redis`
in Docker.
## Contact
TODO...