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
- In AI Janitor settings, click Connect next to GitHub
- Authorize the FeatureSignals OAuth app when prompted
- Select the repositories to grant access to (all repos or specific repos)
- Configure the permission level: Read-only for scanning, Read & Write for PR creation
- Click Save — the connection will be verified automatically
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
- In GitLab, create a Personal Access Token or Group Access Token
- Select scopes: read_repository, read_api, and optionally write_repository
- In AI Janitor settings, click Connect next to GitLab
- Enter your GitLab instance URL (https://gitlab.com for cloud, or your self-hosted URL)
- Paste the access token and click Save
Bitbucket
Required Permissions
- Repositories: Read (required for scanning)
- Pull requests: Read (required for PR analysis)
- Pull requests: Write (required for PR creation)
Setup Steps
- In Bitbucket, create an App Password (Settings → App Passwords)
- Grant permissions: Repositories (Read), Pull Requests (Read, optional Write)
- In AI Janitor settings, click Connect next to Bitbucket
- Enter your Bitbucket username and the App Password
- For Bitbucket Data Center (self-hosted), also provide your base URL
- Click Save — the connection will be verified automatically
Self-hosted instances
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)