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:

  1. Log in to P42.ai and click on Repositories.
  2. In the Repositories page, click to select a GitHub repository.
  3. 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 favourite web browser.

Elements

Here are the main elements you can find in each Repository page: Repository page

  1. Organization or user name Links to the organization or user repositories page. For example, user-a/.

  2. Repository name Name of the GitHub repository. For example, sample-repository-1.

  3. Analysis status Indicates if the analysis is running or pending. When the analysis is finished, the suggestion count is shown. For example, 2796 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.

  4. Enable/disable analysis Indicates if the P42+ analysis is enabled for this repository. Click to toggle.

  5. Excluded repository paths Brings up the Configure Excluded Paths dialog to configure path exclusions for the selected repository.

  6. Link to GitHub repository Link to the GitHub repository. For example, github.com/user-a/sample-repository.

  7. Default repository branch Indicates the default branch for the repository. For example, the default branch for user-a/sample-repository is the main branch.

  8. Suggestions (tab) The suggestions tab contains the suggestions for the repository. See suggestions for more information.

  9. 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:

  1. Click on the \<N> excluded paths button. Click to configure the path exclusions for the repository
  2. 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. Configure Excluded Paths dialog box

    📝  For example, specifying docs/ as a path prefix excludes all paths under the docs directory in the repository.

  3. 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.

Suggestions tab

  1. Expand All Click to show the code refactoring and modernization suggestions for all source files.

  2. Collapse All Click to hide the code refactoring and modernization suggestions for all source files.

  3. File A file for which P42+ has found refactoring and modernization suggestions. For example, packages/vega-canvas/src/domCanvas.js

  4. Expand and Collapse button Click to expand and view the details of the P42 suggestions for the source file Click to collapse and hide the details of the P42 suggestions for the source file 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.

  5. View source file button Click to view the full source file in GitHub Click the view source file button next to a source file to view the original content in GitHub.

  6. Suggestion A suggestion that was found at a specific line number. Click to expand and see potential safety warnings and a detailed diff view.

  7. 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.

Configuration tab

For each code action, there are several UI elements:

  1. Enabled / Disabled Indicates whether this code action is enabled for the repository. Click to toggle enabled/disabled.

  2. Commit Checks Enabled / Disabled Indicates whether commit checks for this code action are enabled for the repository. Click to toggle enabled/disabled.

  3. Learn more Link to the code action documentation for the specific action.

  4. Short summary Description of the code action in 1-2 sentences.

Quick Navigation