Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 2.24 KB

File metadata and controls

70 lines (44 loc) · 2.24 KB

BYOT Setup for GitHub in @knighted/develop

This guide explains how to create and use a fine-grained GitHub Personal Access Token (PAT) for the BYOT flow in @knighted/develop.

What BYOT does in the app

BYOT controls are available by default. The token is used to:

  • authenticate GitHub API requests
  • load repositories where you have write access
  • let you choose which repository to work with
  • use PR context features (Open PR / Push Commit flows)

When AI chat is enabled, the same token is also used for GitHub Models requests.

Privacy and storage behavior

  • Your token is stored only in your browser localStorage.
  • The token is never sent to any service except the GitHub endpoints required by the feature.
  • You can remove it at any time using the delete button in the BYOT controls.

Enable AI chat features

BYOT/PR controls do not require a feature flag. To enable AI chat features, use one of these options:

  1. Add ?feature-ai=true to the app URL.
  2. Set localStorage key knighted:develop:feature:ai-assistant to true.

Create a fine-grained PAT

Create a fine-grained PAT in GitHub settings and grant the permissions below.

Repository PAT permissions

Models PAT permission

Repository permissions

  • Contents: Read and write
  • Pull requests: Read and write
  • Metadata: Read-only (required)

Account permissions

  • Models: Read-only

Repository access scope

Use either of these scopes depending on your needs:

  • Only select repositories
  • All repositories

@knighted/develop will only show repositories where your token has write access.

Recommended setup flow

  1. Create token with the permissions above.
  2. Open @knighted/develop.
  3. Paste token into the BYOT input and click add.
  4. Verify repository list loads.
  5. Select your target repository.
  6. Optional: enable AI chat with ?feature-ai=true.

Screenshots

The screenshots above show the recommended repository and account permission settings.