Prerequisites
- Workspace Admin in CloudThinker, with the Review Setup dialog open at the Connect step.
- On the provider side, permission to install apps, create access tokens, or create IAM roles for the repositories you want reviewed.
- Azure DevOps: permission to create service hooks in the project (Project Administrator by default).
Pick an auth method
Self-hosted GitLab is the only self-hosted provider you can connect in the wizard. GitHub connects to github.com and Bitbucket to bitbucket.org, so GitHub Enterprise Server and Bitbucket Data Center aren’t options there.
GitHub
1
Install the GitHub App
Click Install GitHub App. GitHub asks you to pick an organization or account, then All repositories or Only select repositories. Review can only list the repositories you grant here. GitHub shows the app’s full permission list on that screen before you approve. It includes Pull requests: Read and write for comments and Contents: Read and write, which Apply fix, autofix and conflict resolution need to push commits.
2
Return to the wizard
After you approve, GitHub sends you back and the wizard continues on its own. Webhooks come with the app, so there’s no Events step.Success state: the dialog shows Connected and moves to Repositories.
Installing an app on a GitHub organization needs an organization owner. If you aren’t one, ask an owner to approve the install.
GitLab
- OAuth
- Access token
OAuth connects to GitLab.com only. For self-hosted GitLab, use an access token. With OAuth, comments appear as the person who connected.
- Open the OAuth tab and click Connect to GitLab.
- Approve access in GitLab. CloudThinker asks for these scopes:
api,read_api,read_repository,write_repository,openid,emailandprofile. - Back in the wizard, add the webhook.
Bitbucket
- OAuth
- Access token
- Open the OAuth tab and enter your Bitbucket workspace name (the
<workspace>inbitbucket.org/<workspace>/repo). - Click Connect to Bitbucket and approve access.
Azure DevOps
1
Create a personal access token
In Azure DevOps, go to User settings → Personal access tokens and click New Token. Pick the organization, set an expiration date, and enable these scopes:
Copy the token. Azure DevOps posts comments as the person who owns the PAT, so create it from a dedicated service account. Then reviews keep working when someone leaves. Give that account the Basic access level (Stakeholder can’t use Repos) and Contributor on the project, so it can read code and comment on pull requests.
2
Connect in the wizard
Fill in Organization URL (for example
https://dev.azure.com/myorg), Project and Personal Access Token. Click Validate PAT, wait for Token works, then click Connect.The connection covers the repositories in that one project. To review repositories in another project, set up Review in a separate workspace for it.Success state: the dialog shows Connected and moves to Events.3
Add the service hooks
Follow Configure webhooks.
AWS CodeCommit
Both methods use a script the wizard generates for you. Run it in AWS CloudShell, or in any bash shell with the AWS CLI and credentials for the account (the access keys script also needsjq). A connection covers one AWS account and one region: the region you pick in the wizard.
- IAM role (recommended)
- Access keys
- Select IAM Role (recommended) and choose the AWS Region. The wizard creates an External ID for your workspace.
- Copy the script and run it in AWS CloudShell. It creates a role named
CloudThinkerCodeCommitAccessRolewith a trust policy scoped to CloudThinker and your External ID. If that role already exists, for example from an earlier setup, the script reuses it: it refreshes the trust policy for the new External ID and prints the existing ARN. - Copy the role ARN from the script’s output into Role ARN, then click Connect.
What the script creates
What the script creates
The script attaches one inline policy with these actions:
It doesn’t grant
codecommit:GitPush or codecommit:CreatePullRequest. Auto-resolve conflicts needs both, so add them if you turn it on:- In the IAM console, open Roles → CloudThinkerCodeCommitAccessRole (or Users → CloudThinkerCodeCommitUser for access keys).
- On Permissions, edit the inline policy:
CodeCommitReviewAccesson the role,CodeCommitReviewAccessKeyPolicyon the user. - Add
codecommit:GitPushandcodecommit:CreatePullRequestto theCodeCommitReviewActionsstatement and save.
CloudThinkerCodeCommitUser with the same policy instead.Configure webhooks
GitHub and Bitbucket need nothing here. For the other three, the Events step shows a webhook URL and Secret token to copy.- GitLab
- Azure DevOps
- AWS CodeCommit
- In GitLab, open the group or project and go to Settings → Webhooks → Add new webhook. Group webhooks need GitLab Premium or Ultimate. On the Free tier, add the webhook to each project instead.
- Paste the URL and Secret token from the wizard. Leave Enable SSL verification on.
- Enable Merge request events and Comments. Add Pipeline events if you use pipeline analysis, Tag push events if you use releases, and Push events if you use auto-resolve conflicts. Without Push events, a push to a target branch never reaches CloudThinker, so conflicts it causes aren’t checked.
- Save the webhook, then click Mark as Configured in the wizard.
Token expiry
GitLab and Bitbucket access tokens and Azure DevOps PATs expire on the date you set. Reviews stop when they do, and the Review page shows Reconnect your Git provider. Note the date when you create the token, and replace it before then: open Review → Settings, and in the Connection section open the actions menu (⋯) and click Update token. CodeCommit access keys don’t expire on their own, but rotate them the same way. Review doesn’t warn you before a token’s expiry date, so put a reminder in your own calendar.Disconnect a provider
1
Remove the setup in CloudThinker
Open Review → Settings. In the Connection section, open the actions menu (⋯) and click Remove setup, then confirm. Review stops on every repository and the provider connection is removed. On GitHub, CloudThinker also uninstalls its app, and on Bitbucket it deletes the webhooks it registered. You can set it up again later.
2
Revoke access on the provider
Confirm the GitHub App is gone from your organization’s GitHub Apps settings, or revoke the OAuth grant, delete the access token or PAT, or delete the IAM role or user the script created.
Troubleshooting
Validate Token or Validate PAT fails
Validate Token or Validate PAT fails
Cause: usually a wrong URL or name, or a missing scope:
- GitLab: the URL has a trailing path, or the token’s role is below Developer.
- Bitbucket: the workspace name or repository slug is wrong, a permission is missing, or you chose a workspace or project token on a plan without them.
- Azure DevOps: the Organization URL isn’t
https://dev.azure.com/<org>, the Project name is wrong, or the PAT was made for another organization.
Connected, but no review on a new MR (GitLab, Azure DevOps, CodeCommit)
Connected, but no review on a new MR (GitLab, Azure DevOps, CodeCommit)
Cause: the webhook is missing, has the wrong secret, or lacks a trigger.Check: open the webhook delivery history in your provider and look for failed requests.Fix: compare the URL, secret and triggers against Configure webhooks. For Azure DevOps, confirm all service hooks exist.
Mention commands get no reply on Azure DevOps
Mention commands get no reply on Azure DevOps
Cause: the Pull request commented on hook uses resource version 1.0.Fix: edit that service hook and set Resource version to 2.0.
Bitbucket asks you to confirm the workspace
Bitbucket asks you to confirm the workspace
Cause: you connected with OAuth, and Bitbucket no longer lets CloudThinker find your workspace on its own.Fix: click Set workspace, enter your workspace name in Bitbucket workspace, and click Save workspace.
Next steps
Finish Review setup
Select repositories, choose a review mode and get your first review.
Mention commands
Talk to the reviewer from a PR or MR comment.