How P42 Works

Once you have signed up and installed P42, you can:

P42 automatically analyzes all code changes or commits made to the default branch of a GitHub repository . It also analyzes all pull requests made (to all branches) in the GitHub repository.

P42 Workflow

P42 Workflow

To get started, sign up to P42 with your GitHub account. Then log in to P42 and choose the GitHub repositories where you want to install the P42 app. You can select public or private GitHub repositories, depending on your P42 plan.

P42 automatically runs a codebase analysis on all supported file types (JavaScript and TypeScript) in your GitHub repositories when

  • The P42 installation is complete,
  • There are code changes or commits made to the default branch of the repository, and
  • Commit checks are enabled and pull requests are made to the repository.

ℹ️  P42 codebase analysis run time depends on the number of files and complexity of the source code in each repository.

The analysis results are presented as a list of suggestions for applicable JavaScript and TypeScript source files. Code refactoring and modernization suggestions include:

  • Using template variables to replace string concatenation for better readability,
  • Replacing modifiable var declarations with let and const blocked scope variable declarations,
  • Using of arrow functions instead of the regular functions, and more.

You can review each suggested change in a diff view, and decide whether to accept or reject any or all of the suggestions. If necessary, you can configure specific paths or folders in a repository to be excluded during analysis. Once you have reviewed all suggestions, you can easily open a pull request with all the accepted suggestions with a single click. You can then navigate to GitHub to verify the changes and merge the pull request into the default repository branch.

💡  You can rename the default P42 pull request title and edit the pull request message in GitHub. See Pull Request for more information.

P42 automatically reruns the codebase analysis when any changes are detected in the source code (e.g. new commits), or when new suggestions are available.

💡  Review your P42 suggestions regularly to ensure your JavaScript and TypeScript source code stays clean, modern, and up-to-date.

Quick Navigation