Notefix Docs See the demo site

GitHub Issues

Each note raised becomes an issue in one GitHub repository. Closing the issue marks the note done; reopening it opens the note again.

Before starting, do steps 1 and 2 of How connections work: data-issues="queue" on the tag, and a secret on the store.

1Make a token for Notefix

Notefix needs a fine-grained token that can only touch issues, in only this repository.

  1. Signed in to GitHub, open github.com/settings/personal-access-tokens/new.
  2. Token name: Notefix.
  3. Expiration: pick a date, and put a reminder in your calendar a week before it. When a token expires, the connector stops and says so in its log.
  4. Resource owner: the account or organisation that owns the repository.
  5. Repository access: choose Only select repositories, and pick the repository.
  6. Permissions: find Issues and set it to Read and write. GitHub adds Metadata: Read-only by itself. Leave everything else as it is.
  7. Press Generate token, and copy the token. It starts with github_pat_, and GitHub will not show it again.
Note

If the repository belongs to an organisation, an owner of the organisation may have to approve the token before it works.

Careful

Do not use a classic token. A classic token with the repo scope can read and write every repository your account can see.

2Write the settings file

On the server where the store runs, make a file only you can read:

sh
sudo mkdir -p /etc/notefix
sudo install -m 600 -o "$USER" /dev/null /etc/notefix/github.env
nano /etc/notefix/github.env

Put this in it, with your own values:

sh
NOTEFIX_API=http://127.0.0.1:8097
NOTEFIX_BOARD=staging
NOTEFIX_SECRET=the-secret-you-gave-the-store
NOTEFIX_SITE=https://staging.acme.com
GITHUB_TOKEN=github_pat_paste-your-token
GITHUB_REPO=acme/web
Setting
NOTEFIX_BOARDThe same board as data-board on your page
NOTEFIX_SITEThe address people open the page at, for the link back from each issue
GITHUB_REPOowner/name, as in the repository's address
GITHUB_LABELSOptional. Labels for every issue, separated by commas: notefix,review

3Try it

From the unzipped download, start the connector by hand:

sh
set -a; . /etc/notefix/github.env; set +a
python3 connectors/runner.py github

It checks the token and the repository first. When all is well it says:

github connector on board 'staging' via http://127.0.0.1:8097

Now, on your page:

  1. Open a note and press Create an issue. It says QUEUED for a moment.
  2. Within about 15 seconds, the note shows #1 and the issue is in your repository.
  3. Close the issue on GitHub. Within a minute, the note turns green.

In Settings, under Connected tools, GitHub Issues now shows your repository and Working.

Stop the connector with Ctrl C, and run it as a service so it keeps going.

What the issue looks like#

GitHub has no way for programs to attach images to an issue, so screenshots stay on the note, one click away through the link.

Closed as completed or as not planned, either way the note is marked done.

If it does not work#

The connector saysWhat to do
GitHub says 404 … the repo does not exist, or the token cannot see itCheck GITHUB_REPO. Otherwise the token was not given this repository in step 1.5
GitHub rejected the tokenThe token was copied wrong, has expired, or was deleted. Make a new one
Issues are turned off on …In the repository's Settings, under Features, turn on Issues
GITHUB_REPO must look like owner/nameUse the part of the address after github.com/, like acme/web
attempt 1 failed (HTTP Error 403: Forbidden)NOTEFIX_SECRET does not match the store's NOTES_CONNECTOR_SECRET

See Troubleshooting for notes that stay QUEUED.