Repository Page
Each repository where the P42 app is installed has its own Repository page. The Repository page contains a detailed breakdown of the refactoring and modernization suggestions specific to the repository.
To view the Repository page:
- Log in to P42.ai and click on Repositories.
- In the Repositories page, click to select a GitHub repository.
- In the Repository page, you will see the suggestions (if any) from the analysis.
๐กย ย Easily access the Repository page for your most important repositories by creating bookmarks in your favorite web browser.
Elements
Here are the main elements you can find in each Repository page:
Organization or user name Links to the organization or user repositories page. For example,
user-a/
.Repository name Name of the GitHub repository. For example,
sample-repository-1
.Analysis status Indicates if the analysis is running or pending. When the analysis is finished, the suggestion count is shown. For example,
21 suggestions
.๐กย ย If you see the "Analysis timed out" status, this means the analysis runtime for the repository has exceeded ten minutes. You can try to resolve this error by excluding large files or folders (e.g. imported third-party libraries) from the analysis. See path exclusions on how to do this.
Enable/disable analysis Indicates if the P42 analysis is enabled for this repository. Enabled by default for non-forked repositories. Click to toggle.
Enable/disable code review Indicates if automated code review is enabled for this repository. Enabled by default for new repositories. Click to toggle.
Excluded repository paths Brings up the Configure Excluded Paths dialog to configure path exclusions for the selected repository.
Link to GitHub repository Link to the GitHub repository. For example,
github.com/user-a/sample-repository
.Default repository branch Indicates the default branch for the repository. For example, the default branch for
user-a/sample-repository
is themain
branch.Suggestions (tab) The suggestions tab contains the suggestions for the repository. See suggestions for more information.
Configuration (tab) The configuration tab contains the code action configurations for this repository. See configuration.
Path Exclusions
You can configure P42 to exclude specific paths or files in the repository from all codebase analysis and commit checks. By default, P42 adds path exclusions for output folders (e.g. folders containing rendered output files), minimized libraries, and third-party libraries embedded in your codebase.
To configure path exclusions:
- Click on the \<N> excluded paths button.
- In the Configure Excluded Paths dialog box, enter the prefix of the files or directories which you want to exclude for all P42 analysis and checks. Press the Enter key to specify multiple prefixes on multiple rows.
๐ย ย For example, specifying
docs/
as a path prefix excludes all paths under thedocs
directory in the repository. - Click Accept to save the changes, otherwise click Cancel to revert to the previous settings.
Suggestions
The suggestions tab contains the refactoring and modernization suggestions identified by P42 for your GitHub repository during the codebase analysis.
๐กย ย P42 codebase analysis works best on source files that use code formatters, such as Prettier.
Expand All Click to show the code refactoring and modernization suggestions for all source files.
Collapse All Click to hide the code refactoring and modernization suggestions for all source files.
File A file for which P42 has found refactoring and modernization suggestions. For example,
packages/vega-canvas/src/domCanvas.js
Expand and Collapse button
Toggle the expand and collapse button next to a source file to show or hide the detailed code refactoring and modernization suggestions from P42 in a diff view.
View source file button
Click the view source file button next to a source file to view the original content in GitHub.
Suggestion A suggestion that was found at a specific line number. Click to expand and see potential safety warnings and a detailed diff view.
Diff view The diff view shows the suggestion change in a before/after view.
Configuration
The configuration tab contains the different code actions and their configuration for the repository.
For each code action, there are several UI elements:
Enabled / Disabled Indicates whether this code action is enabled for the repository. Click to toggle enabled/disabled.
Code Review Hint / Blocker Indicates whether suggestions for this code action lead to a P42 code review check failure. Code review hints (default) do not fail checks. Code review blockers fail checks. Click to toggle enabled/disabled.
Learn more Link to the code action documentation for the specific action.
Short summary Description of the code action in 1-2 sentences.