Bitbucket
Only Bitbucket Cloud is supported - AppArch talks to api.bitbucket.org. Bitbucket Data Center / Server is not supported.
Bitbucket accepts two kinds of credential. App passwords are not offered: Atlassian has retired them.
Option 1: OAuth client
Section titled “Option 1: OAuth client”- Credentials → Add credential → Bitbucket → Register an application.
- In Bitbucket open your workspace’s Workspace settings → OAuth clients → Create OAuth client.
- On the Authorization tab, paste the Callback URL the wizard shows, exactly as shown.
- On the Scopes tab grant: Account, Repositories, Pull requests, Webhooks. The wizard also asks for Pipelines: Read and write, which AppArch uses to check and write the runner’s Pipelines variables.
- Copy the client’s Client ID and Secret into the wizard and save. A workspace slug is optional.
- Finish the authorization with Connect with Bitbucket on the credential.
Bitbucket access tokens from this flow live about two hours. AppArch refreshes them automatically with the stored refresh token.
Option 2: Access token
Section titled “Option 2: Access token”- Credentials → Add credential → Bitbucket → Access token.
- In Bitbucket create a workspace or repository access token with the
repositoryandpullrequestpermissions. - Paste it into the wizard. A workspace slug is optional.
Before the token is stored, AppArch reads what it may do. A token without repository read access is refused; one without pull request write access is accepted with a read-only warning (no ArchPilot comments). AppArch never refreshes an access token.
What it enables
Section titled “What it enables”- ArchPilot comments on pull requests.
- ArchScan / ArchSecurity results from CI runs appear in the panel.
CI (Bitbucket Pipelines)
Section titled “CI (Bitbucket Pipelines)”pipelines: pull-requests: '**': - step: image: name: hub.apparch.io/collectors/dotnet:latest username: $APPARCH_INSTALLATION_ID password: $APPARCH_INSTALLATION_KEY run-as-user: 0 # the clone belongs to root; a PR run fetches the target branch into it script: - export APPARCH_Collector__Token="$APPARCH_TOKEN" - export APPARCH_Collector__ApiUrl="https://api.yourdomain.com" - apparch "$BITBUCKET_CLONE_DIR"The runner recognises a pull request run from Bitbucket’s BITBUCKET_PR_ID variable.