FeatureSignals

AI Janitor Git Providers

AI Janitor integrates with your Git provider to scan source code for feature flag references and generate cleanup pull requests. Choose your provider below for detailed setup instructions.

Supported Providers

GitHub

GitHub.com, GitHub Enterprise Server, GitHub Enterprise Cloud

GitLab

GitLab.com, GitLab Self-Managed (CE/EE)

Bitbucket

Bitbucket Cloud, Bitbucket Data Center

Connection Methods

AI Janitor supports two connection methods for each provider:

OAuth (Recommended)

Click-through authorization via the provider's OAuth flow. AI Janitor never sees your credentials; permissions are scoped and revocable from your provider's settings. Available for GitHub, GitLab, and Bitbucket Cloud.

Access Token

Provide a personal access token or app password. Required for self-hosted instances (GitHub Enterprise Server, GitLab Self-Managed, Bitbucket Data Center) where OAuth may not be configured. Tokens are encrypted at rest.

Setup by Provider

GitHub

Required Permissions

  • Read access to code and metadata (required for scanning)
  • Read access to pull requests (required for PR analysis)
  • Write access to pull requests (required for PR creation)
  • Read access to commit statuses (optional, for CI status checks)

Setup Steps

  1. In AI Janitor settings, click Connect next to GitHub
  2. Authorize the FeatureSignals OAuth app when prompted
  3. Select the repositories to grant access to (all repos or specific repos)
  4. Configure the permission level: Read-only for scanning, Read & Write for PR creation
  5. Click Save — the connection will be verified automatically
GitHub OAuth App:Fine-grained personal access token or OAuth

GitLab

Required Permissions

  • read_repository (required for scanning)
  • read_api (required for project/merge request metadata)
  • write_repository (required for PR/MR creation — GitLab merge requests)

Setup Steps

  1. In GitLab, create a Personal Access Token or Group Access Token
  2. Select scopes: read_repository, read_api, and optionally write_repository
  3. In AI Janitor settings, click Connect next to GitLab
  4. Enter your GitLab instance URL (https://gitlab.com for cloud, or your self-hosted URL)
  5. Paste the access token and click Save
GitLab OAuth Application:Personal access token or Group access token

Bitbucket

Required Permissions

  • Repositories: Read (required for scanning)
  • Pull requests: Read (required for PR analysis)
  • Pull requests: Write (required for PR creation)

Setup Steps

  1. In Bitbucket, create an App Password (Settings → App Passwords)
  2. Grant permissions: Repositories (Read), Pull Requests (Read, optional Write)
  3. In AI Janitor settings, click Connect next to Bitbucket
  4. Enter your Bitbucket username and the App Password
  5. For Bitbucket Data Center (self-hosted), also provide your base URL
  6. Click Save — the connection will be verified automatically
Bitbucket OAuth Consumer:App password or OAuth consumer key/secret

Self-hosted instances

For self-hosted Git providers (GitHub Enterprise Server, GitLab Self-Managed, Bitbucket Data Center), you must provide your instance's base URL during setup. AI Janitor will use this URL for all API calls. Ensure your instance is reachable from FeatureSignals' IP ranges — see the Network Configuration guide for details.

Managing Connections

You can manage all Git provider connections from the AI Janitor settings page:

  • Add connection — Connect additional providers or repositories
  • Reauthorize — Refresh an expired OAuth token
  • Change permissions — Upgrade from read-only to read-write for PR creation
  • Remove connection — Disconnect a provider (existing scan results are preserved)

Next Steps