Codenotify as a Service.
Codenotify.run is a GitHub App backend of Codenotify that lets you subscribe to file changes in pull requests. It's a great way to stay up to date with changes to files you care about.
The GitHub Action offered by the upstream Codenotify uses the designated GITHUB_TOKEN
which has some shortcomings:
- It cannot mention teams in pull request comments
- It cannot post comments if the pull request is coming from a fork repository
Using a personal access token would of course solve the first problem, but a personal access token is too powerful and it is impractical to add it to all fork repositories (i.e. can't solve the second problem).
Free public server comes with absolutely shitty availability.
- Install the Codenotify GitHub App on your repositories.
- Add some CODENOTIFY files.
Docker images for the Codenotify.run server are available both on Docker Hub and GitHub Container Registry.
Note The
latest
tag represents the latest build from themain
branch.
You need to create a custom
directory for the configuration file app.ini
:
$ mkdir -p custom/conf
$ touch custom/conf/app.ini
Please refer to Local development > Step 2: Create a test GitHub App for creating a GitHub App, setting up a reverse proxy and filling out necessary configuration options. View conf/app.ini
for all available configuration options.
Note The Caddy web server is recommended for production use with automatic HTTPS.
Then volume the custom
directory into the Docker container for it being able to start (/app/codenotify.run/custom
is the path inside the container):
$ docker run \
--name=codenotify.run \
-p 12830:2830 \
-v $(pwd)/custom:/app/codenotify.run/custom \
unknwon/codenotify.run
- Git (v2.3 or higher)
- Go (v1.19 or higher)
- Task (v3)
- ngrok
- Codenotify (v0.6.4 or higher)
-
Install Homebrew.
-
Install dependencies:
brew install git go go-task/tap/go-task ngrok go install https://github.com/sourcegraph/[email protected] # In the root directory of the repository ln -s $(go env GOPATH)/bin/codenotify $(pwd)/.bin/codenotify
You need to use the ngrok
to get a public URL for your local development server to be able to receive GitHub webhooks:
$ ngrok http 2830
Follow this magic link to create your test GitHub App.
Once you have created your test GitHub App, put the App ID and Private key in the custom/conf/app.ini
file:
[github_app]
APP_ID = 123456
PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----"""
$ task
By default, the server will listen on address 0.0.0.0:2830
, but you can change it by setting the FLAMEGO_ADDR
environment variable:
$ FLAMEGO_ADDR=localhost:8888 task
Don't forget to restart your ngrok
and update your custom/conf/app.ini
file before you changed the port!
[server]
EXTERNAL_URL = http://localhost:8888
The logo is a remix of two icons from flaticon.com.
This project is under the MIT License. See the LICENSE file for the full license text.