Setup
Connect to Bitbucket
Set-up an OAuth Consumer
For each workspace:
- Navigate to Workspace Settings → OAuth consumers
- Click “Add Consumer”.
- Name the consumer “Glean OAuth Consumer”
- Set the Callback URL. Glean will supply you with the correct URL for your project.
- For Permissions, select Account:Read (This will automatically select Account:Email as well).
- Click save.
- Supply the OAuth consumer key to the “OAuth Client Id” box
- Supply the OAuth Secret to the “OAuth Client Secret” box
Create an App Password
Note: Whichever workspaces and repositories this user has access to will be crawled. Ensure that all the workspaces to which this user has access have also installed the webhook app.
- Navigate to Personal Settings → App passwords
- Click Create app password
- Label it: “Glean App Password”
- Assign read permissions to:
- Account
- Workspace membership
- Projects
- Repositories
- Pull requests
- Issues
- Wikis
- Copy the app password and supply it to the “App password” input box
- Copy the user’s username (found under Personal Settings → Account settings) and supply it to the “Auth username” input box
Setup Webhook Apps
Webhook apps are created by Glean and installed in your Bitbucket instance via installation URL. Glean will supply you with the installation URL for your project. For each workspace: Install the Webhook App.
- Navigate to the installation URL. If this prompts you to enable development mode for your workspace, please do so and re-try the above url.
- This may error after the user authorizes the application (known issue on Bitbucket’s end). Navigate back to “Installed Apps” on the sidebar and confirm that the app has been installed. Click Save in Glean. You’re all set!