Skip to main content
Clayton Quick Start Guide

Providing the first steps for getting your code and team connected to Clayton

Nicole Bazarova avatar
Written by Nicole Bazarova
Updated yesterday

Step 1: Connecting Clayton to your repository

  • If you are using ADO or GitLab, create a dedicated Clayton service user in your version control repository. Assign repository admin permissions to this service user

  • Add a new connection to your repository (using the service user's credentials for ADO and GitLab)

Depending on your version control provider, you will need to either be a repository or organisation admin to complete this step

  • BitBucket: a BitBucket organisation admin must create the connection

  • GitHub, ADO, GitLab: a repository admin must create the connection

  • After selecting your repository, choose the policies you would like Clayton to scan for violations against

  • While the repository is being initialised, choose the protection mode for new PRs

    • By default, Clayton will scan all PRs regardless of the target branch. If you would like Clayton to only scan PRs targeting specific branches, select "Scan PRs only when the destination is a tracked branch." You can then adjust your tracked branches once set-up is complete

To see status checks reflected in the Gearset Pipeline, you must choose "Protect what's new" or above. This will not block you from merging PRs unless branch protections are also configured

  • If you want violations to block merging until they are fixed, configure branch protections in your version control provider

If using GitHub, you will first need to open a new PR for GitHub to recognise the policies as existing status checks for a branch protection rule

Step 2: Adding team members to Clayton

  • With Step 1 configured, users will see the results of Clayton's scans whenever they open a PR -- both directly in the Pipeline, as well as with detailed in-line comments on the PR

  • In order to take advantage of all of Clayton's features (e.g. autofixes), you will need to add each team member to your Clayton account

Alternatively, you can verify your Email Domain so that your team members will automatically join your account when they try and log in for the first time with their organisation email

  • To ensure relevant team members can interact with the project, set the visibility:

    • "Entire workspace" means all team members (excluding collaborators) will be able to interact with the project

    • "Team only" means only team members explicitly added to the project will be able to interact with the project

Step 3: Team member configuration

  • With step 2 configured, relevant team members will now be able to view the results of PR scans directly in Clayton and use the autofix feature

  • In order for Clayton to analyse your team members' repository contributions, each team member must add their associated Git email address in their personal settings

  • After adding their Git email, team members will now be able to view their personalised insights -- showing them their open issues and bespoke learning resources

  • Any Clayton admin will also be able to view their team members' overall contributions

Did this answer your question?