AWS CodeCommit is available on the Enterprise plan. Contact your enterprise account manager to enable CodeCommit preview access for your organization.
Prerequisites
- A Gitar organization with CodeCommit preview access enabled.
- Administrator access to the organization’s configuration in Gitar.
- An AWS CLI installation with an AWS SSO profile for the account that owns the repositories.
- Permission to create and configure IAM roles and inline policies in that account.
Connect repositories
1
Add an installation
In the Gitar dashboard, open Settings → Configuration and find Amazon CodeCommit. Open the connection and select + Add installation.Enter the 12-digit AWS account ID and AWS region, such as
us-east-1. Repeat setup for each additional account or region.2
Choose AWS access
Select Get Setup Instructions and choose the capabilities to grant. Select it again to generate the setup script for that account and region.These choices tailor the AWS permissions in the setup script. They do not change your Gitar feature settings.
3
Run the AWS setup script
Review and download the Complete setup script from Gitar. Run it with the AWS SSO profile for the repository account:The script signs in to AWS and checks the account ID before configuring IAM roles. It creates the Gitar bot and provisioner roles, plus the role EventBridge uses to deliver events. Review the generated policies before running the script.The generated repository policy covers all repositories in the selected AWS account and region. Selecting repositories in Gitar controls which repositories Gitar processes, but does not narrow the IAM grant. To restrict AWS access, narrow the repository resources in the bot role’s policy before applying it.When fixes are selected, the generated policy denies pushes to branches named
main and master. If your protected branches use other names, adjust that deny rule before running the script.4
Finish setup and validate access
Return to Gitar and select I’m Done. Gitar adds the installation and configures EventBridge delivery for PR and comment events. CI analysis also needs delivery of CodeBuild and CodePipeline events.Select Validate AWS access on the installation. Repository permission checks are skipped until at least one repository is connected. Add repositories in the next step, then validate again to complete those checks.To repair missing permissions, generate setup instructions again and rerun the script. If you customized the policies, reapply those restrictions to the regenerated instructions before running them.Access validation inspects the bot role’s inline policies. If you customize setup, keep the required grants in inline policies. This check does not evaluate permissions supplied only by attached managed policies.
5
Select repositories
Open the installation’s repository manager, select Add repositories, choose the repositories to connect, and select Add selected.Return to the installation and select Validate AWS access again. Resolve any failed capability or delivery checks before testing a PR.Open a PR or push a commit to an open PR in a connected repository. Gitar posts review findings when the review completes.
Add repositories later
New repositories are not connected automatically. Open the installation’s repository manager and select Add repositories. If a repository is missing from the picker, select Refresh inside the picker, then select the repository and Add selected. Validate AWS access again after adding repositories. If you restricted IAM access to specific repository ARNs, extend that policy to include the new repositories first.Comments and fixes
ReplyGitar fix to a finding to request a fix. Every requester, including the PR author, needs push permission that Gitar can validate through AWS IAM.
CodeCommit drops PR comment threads from the Changes tab after a fresh commit. But the Activity tab still preserves context and interaction with Gitar. Refresh the page to see Gitar’s replies and fix commits.
Merge blocking
Enable Block Merge to hold PRs with unresolved findings at the configured severity. Gitar adds a native approval rule and removes it when the review clears. Existing customer approval rules remain in place. Merge blocking needs the approval-rule permissions included in Code review on pull requests. These permissions are optional for basic reviews, so setup can complete even when they are missing or cannot be confirmed. Review any optional-permission warnings before enabling Block Merge. When an admin enables thegitar unblock command, an authorized commenter can use it to remove Gitar’s block for the current review cycle.