This page provides information about contributing to the Plugin Health Scoring code base.
The project is using Maven with Java 17 and Yarn to be built. The entire build process can be handled by Maven. When building, Yarn will bundle the front-end files only.
-
Clone the repository.
-
Install tools
-
Java 17
-
Maven 3.8.6 Optionally, you can use the wrapper in the repository. In that case, replace the
mvn
command by./mvnw
in the command listed bellow. -
Node 18.10.0 and Yarn 3.2.4
-
-
Open the project in your favorite IDE.
If you simply want the project binary, run:
mvn package -Dmaven.test.skip
There are two ways to run the project locally. Either way, the application requires some environment variables to be configured and a GitHub App.
-
Environment variables:
link:.env.example[role=include]
-
To create the GitHub App, please see https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app
The application requires the following permissions:
-
Repository content (read-only)
The private key needs to be converted with
openssl pkcs8 -topk8 -inform PEM -outform PEM -in ORIGINAL_KEY.pem -out CONVERTED_KEY.pem -nocrypt
Note
|
You need to change ORIGINAL_KEY and CONVERTED_KEY with real values.
|
This method is preferred if you intend to submit any modifications to the project.
In one terminal, run:
yarn dev
and in a second terminal run:
mvn spring-boot:run -Dskip.yarn
Note
|
Don’t forget to set the required environment variables. |
The project has unit and integration tests. You can run all those with
mvn verify
Warning
|
The integration tests requires Docker to be installed. |
All proposed changes are submitted and reviewed through a GitHub pull request. To submit a pull request:
-
Create a branch prefixed with
feature/
for a new enhancement,fix/
for a bugfix. -
Commit your changes to this new branch.
-
Push the branch to your fork of the repository.
-
In the GitHub Web UI, select the New pull request option.
-
Fill in the pull request description.
-
Click the Create pull request button.
The pull request will be built in ci.jenkins.io.