Table of Contents
- Pull Request Integration, Explained
- Primary Stakeholders
- Enabling Codescene's Pull Request Integration
- Custom Quality Gates: Advanced Config-as-Code
- Getting the Most Out of Codescene's Pull Request Integration
- Q&A
Pull Request Integration, Explained
CodeScene's Pull Request (PR) integration acts as an automated defense mechanism against technical debt, ensuring that all new and modified code aligns with your organization’s goals and quality standards. This integration automates the Code Health review process, simplifying code reviews and enhancing code maintainability and readability.
Primary Stakeholders
- Developers: Benefit from automated reviews that enforce code quality standards.
- Engineering Managers: Ensure organizational goals are met through tailored code quality profiles.
Enabling Codescene's Pull Request Integration
- Global Configuration: Apply a shared configuration across all CodeScene projects.
- Project-Specific Configuration: Override global settings with project-specific configurations.
- Select a Code Quality Profile: Choose between pre-defined profiles or use configuration as code for flexibility.
-
Bare Minimum: Recommended starting point for new customers, enforcing critical Code Health rules like Low Cohesion, Deep Nested Logic, and Brain Functions. Prevents new technical debt and ensures no decline in Hotspot Code Health
-
Clean Code Collective: Builds on the “Minimal Safety Net” with advisory rules backed by research. Prevents declines in Code Health for any file, matching the standards from the Code Red paper.
-
Pay down tech debt: The most robust profile, enabling all checks and enforcing your specified goals (e.g., “Supervise” and “Refactoring”). Ideal for teams optimising productivity and addressing technical debt.
-
Customizable Safeguards: Allows you to combine checks, like the “Minimal Safety Net,” with specific goals, such as targeted Code Health improvements
-
Custom Quality Gates: Advanced Config-as-Code
For advanced users, tailor checks by code area or team, providing precise control over quality gate application—unlike the uniform pre-defined profiles which apply the same rules to all code inside the CodeScene project. More information can be found here.
Getting the Most Out of Codescene's Pull Request Integration
- Select Appropriate Profiles: Start with "The Bare Minimum" for onboarding, then elevate to "Clean Code Collective" as teams adapt.
- Use Custom Quality Gates: Tailor checks for different codebase sections or teams using the advanced configuration.
- Suppress Findings: Use CodeScene’s suppression mechanism to manage findings pragmatically.
Q&A
Q: Where can I find the full documentation of the PR integration?
A: Full documentation can be found here.
Q: What platforms does the integration support?
A: It supports GitHub, BitBucket, GitLab, Azure, and Gerrit (on-prem).
Q: How do I manage different quality standards for different teams?
A: Use the advanced config-as-code feature to apply specific rules to different teams or codebase sections.
Q: Can I track the impact of pull requests over time?
A: Yes, CodeScene visualizes PR impacts, showing statistics like checks performed, findings detected, and more.
Q: How do I enable status badges?
A: Configure status badges in the Project Configuration to monitor project health at a glance.