Code Repository Insights
Code repositories provide critical information about development artifacts and its associated activities. Oracle Cloud Infrastructure (OCI) DevOps service provides insights in tabular and graphical format for the code repository activity and usage.
Data collected such as number of commits, number of pull requests raised, merge failures, commit frequencies and review timelines can be visualized to discover useful insights and data patterns. This data helps teams in identifying bottlenecks in the development processes and take corrective actions. The code repository insights help in monitoring and measuring the project progress and team effort, which in turn helps in measuring team productivity and project planning.
Metrics for the code repositories such as number of commits, number of pull requests, and PR review times are provided as visually appealing graphs. The metric allows users to quickly identify trends and patterns in the data. Insights can be generated based on specific repository, time period, and contributor. Insights are also available at the project level, which includes data from all the repositories in the given project. Data can be filtered based on repository and contributor. Data might not be available for certain criteria, for example, if the date range selected doesn't match any of the repository activity.
You can copy and share insight links with others. The link direct recipients to the respective insight page in the OCI Console. Based on access permissions, recipients can view insights and edit insight filters. This enables collaborative analysis between the users. For more information, see DevOps IAM Policies.
You can export commit and pull request data for projects and repositories through REST APIs for further analysis, such as comparing metrics for two repositories or projects to identify potential issues. If the date range is not specified, then by default the last 30 days data is retrieved. Data is retrieved as JSON objects.
Insight Categories
Code repository insights are categorized into five sections:
Activity: A summary of key activities in the repository is provided. This includes:
- Number of commits.
- Number of contributors.
- Number of pull requests created, merged and declined by users.
By default, the data is generated for the last three days and can be filtered based on a specific date range. The metrics are visually represented as graphs, which is easy to understand.
Code Frequency: Data about code commits for a specific date range across contributors is provided. This helps to analyze and compare code commits. By default, the commits are grouped by week. Data is captured for teams as well individuals and graphically presented, providing historical trend of the team's and individual's code contribution. You can select a part of the graph to get a drill-down of the data for a particular time period.
Pull Requests: Displays pull request data for a particular time period. You can filter data on a weekly or monthly basis. The metrics are shown as stacked bar graph with different colors used to represent various PR status such as opened, merged, and declined. You can select a single bar (representing a week's data), which displays the daily breakdown of PRs for that week in tabular format.
Review Time: The time taken to review pull requests is provided for a specific time period. The review time is calculated by averaging the following two values:
- Pull request start time: The time from when a PR is created to the first comment.
- Pull request review time: The time from the first comment to when the PR is merged or closed.
The calculation is done on a monthly or weekly basis. The metrics provide valuable information about potential bottlenecks in the PR review process. Both metrics are averaged based on the weekly/monthly grouping.
Commits and PR Summary: Displays a comprehensive summary of the commits and pull requests based on contributors for a particular time period that can be sorted ascending or descending. For each contributor, data such as number of commits and number of pull requests created, merged, approved, and reviewed is provided. Count of PR comments for each contributor is also available. The data provides insight on team's productivity.
Using the Console
For accessing the insights using the Oracle Cloud Console do the following:
- Open the navigation menu and click Developer Services. Under DevOps, click Projects.
- Select a project.
- Click the Insights link on the left-side menu under Code Repositories.
- To access the insights for a specific code repository, click Code Repositories on the left-side menu, select a code repository, and then click the Insights link on the left-side menu.
- The Activity tab is displayed by default. Click other tabs in the insights to check all the metrics and data about the selected repositories.