Getting Started

Welcome to CodeScene - we’re happy to have you here! This guide will help you get started. Before we go there, let’s have a look at what CodeScene does for you.

The history of your code predicts its future

CodeScene is a tool that your software project improve their efficiency by identifying and prioritizing technical debt. We take a different approach to software analysis since we base the results on behavioral and social data.

Our main data source is version-control repositories, which CodeScene views as a behavioral log of how the developers interact with the codebase. This means we can prioritize based on how the system grows and also include a social dimension of code that lets our customers discover team productivity bottlenecks and save on- and off-boarding costs.

Log in with GitHub, Bitbucket, Azure DevOps or GitLab

To analyze your code you need to connect CodeScene with your source code hosted on GitHub, Bitbucket, Azure, or GitLab.

If you don’t have a GitHub, Bitbucket, Azure DevOps or GitLab account we recommend that you check-out our on-premises version of CodeScene.

Log in with GitHub

When you click on the Login button on CodeScene’s front page you’ll be redirected to GitHub for authentication and authorization. Type your GitHub credentials as shown in Fig. 1.

Sign into GitHub

Fig. 1 Sign in using your GitHub credentials.

Because of how the GitHub API works, CodeScene is forced to request read and write access. We do, however, never write any data to your Git repositories, and we never will.

Log in with Bitbucket

Click Log in with Bitbucket on the front page. You’ll be redirected to the Bitbucket’s consent page:

Log in with Azure

Click Log in with Azure on the front page. You’ll be redirected to the Azure’s consent page:

Log in with GitLab

Click Log in with GitLab on the front page. You’ll be redirected to the GitLab’s consent page:

Additional scopes required

Users give CodeScene access to their provider’s (GitHub, etc..) identifying information such as username and email. For some users this is sufficient, because they only view analysis results.

If you want to create projects, run analysis, configure projects, and run Pull Request integration, we require more access, such as access to your repositories and pull requests.

See providers pages for explanation of why we require the particular level of access: GitHub, Bitbucket, Azure, GitLab.

Run your first analysis

After you log in, you’re ready to analyze your project.

Click Create New Project to configure an analysis project. You will be prompted to grant additional access to your provider. CodeScene fetches a list of all your repositories from GitHub (or other provider) and lets you specify the projects to analyse as shown in Fig. 2.

Create an analysis project

Fig. 2 Specify the repositories to analyse.

CodeScene’s free plan lets you analyse open source projects. The paid plans also let you analyse private repositories as well as repositories that belong to an organization you’re a member of.

CodeScene also supports projects where the code is split across multiple repositories. In that case you just selects all those repositories and CodeScene will take care of the rest.

If you’re using Azure provider all the repositories selected must be from the same account.

Once you’ve selected the repository to analyse, CodeScene prompts you with the initial configuration as shown in Fig. 3.

Configure your analysis project

Fig. 3 Configure your analysis project

That’s it! No further setup is necessary. Just press the button in CodeScene to launch your first analysis. The analysis may take some time to complete so we recommend that you use that time to check-out our Focus Areas. They’ll make sure you get the most out of your analysis.

Run a retrospective analysis

CodeScene also includes the option to run an analysis tailored to a Retrospective, and lets a team evaluate how their work in the current sprint/iteration impacted the codebase. You launch a retroseptive using the rewind button highlighted in Fig. 4.

Start a retrospective analysis

Fig. 4 Start a retrospective analysis of your team’s effort in a sprint.

To learn more about the retrospective feature and its use cases, we recommend that you check out the article on Relevant Retrospectives.

Set an automatic analysis schedule

If you’re on CodeScene’s paid plan you can enable automatic analysis runs on your project.

Open the project configuration page and go to Analysis Schedule tab shown in Fig. 5.

Add schedule for automatic analysis

Fig. 5 Specify the content to exclude from your analysis.

You can choose an interval and click Save. An analysis will be run once every interval. The specific time within that interval will be shown to you.

It is recommended that you enable scheduled analyses for projects in active development.

A scheduled analysis will be skipped if you’ve recently manually triggered an analysis run.

What’s an Active Author?

CodeScene’s subscription model uses the number of active contributors as one the main criteria. An active author is anyone who has committed code over the past three months to the codebase you want to analyse. This time period is a sliding window that always starts at the date of the most recent commit in your repositories. CodeScene applies the following additional rules:

  • Each author is only counted once. That is, if you analyze multiple codebases, the same persons only count once no matter how many projects they contribute to.

  • Historic contributors are free. People who haven’t committed code within the last three months are included for free and don’t add to the license fee.

You can get a rough estimate on the number of active authors (the past 3 months) in a Git repository through the following command:

git shortlog -sne --all --since "3 months ago"

To get all the authors after specific date:

git shortlog -sne --all --after=2022-07-01