codenotify.run

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 23 Imported by: 0

README

codenotify.run

Codenotify as a Service.

What?

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.

Why?

The GitHub Action offered by the upstream Codenotify uses the designated GITHUB_TOKEN which has some shortcomings:

  1. It cannot mention teams in pull request comments
  2. 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).

How?

Install the Codenotify GitHub App on your repositories and add some CODENOTIFY files.

Local development

Step 1: Install dependencies
macOS
  1. Install Homebrew.

  2. Install dependencies:

    brew install git go go-task/tap/go-task ngrok
    go install https://github.com/sourcegraph/codenotify@v0.6.4
    
    # In the root directory of the repository
    ln -s $(go env GOPATH)/bin/codenotify $(pwd)/.bin/codenotify
    
Step 2: Create a test GitHub App

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-----"""
Step 3: Start the server
$ 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

Credits

The logo is a remix of two icons from flaticon.com.

License

This project is under the MIT License. See the LICENSE file for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL