# GitHub and YouTrack wiring

Jaisiu's integrations are channel adapters — small daemons that translate between the host where Jaisiu runs and the SaaS API. The GitHub adapter reads issues, opens PRs, and writes review comments. The YouTrack adapter reads tickets, comments, and updates state. Both are opt-in: you turn them on per-repo or per-board, you mint the OAuth token, and you revoke it from the SaaS side when you stop. Revoking a token is a single API call; the local adapter picks up the revocation on its next poll.

## GitHub

1. Create a GitHub fine-grained PAT (Settings → Developer settings → Personal access tokens → Fine-grained tokens).
2. Grant only the scopes you actually use. Most teams need: _Contents: Read_, _Issues: Read & Write_, _Pull requests: Read & Write_, _Metadata: Read_ (automatic).
3. Paste the token into Jaisiu's dashboard: **Settings → Integrations → GitHub**. Jaisiu stores it in your local OS keychain, never on the Pryzm server.
4. Pick the repos you want Jaisiu to see. Jaisiu can't see repos you didn't grant.

## YouTrack

1. In YouTrack: _Hub → your project → Edit project → Authentication → New token_. Pick a name like `jaisiu-$(hostname)` so the audit trail is obvious.
2. Copy the token. Paste it into Jaisiu at **Settings → Integrations → YouTrack**.
3. Pick the projects Jaisiu can read and write. The default is read-only; switch to write once you've seen the agent's first comment.

## Revocation

If you suspect a token leak, revoke from the SaaS side first. Jaisiu's local adapter will see the revocation within its poll interval (default 60s) and stop using the token. The token is removed from the local keychain on the next login or on `jaisiu logout`.

For a full reference with per-scope screenshots, see the [agent reference](https://pryzm.at/efss/viewer.html#docs%2Fgetting-started%2FPRYZM-AGENT-REFERENCE.md).
