Skip to content

Latest commit

 

History

History
112 lines (76 loc) · 2.62 KB

CONTRIBUTING.adoc

File metadata and controls

112 lines (76 loc) · 2.62 KB

Contributing to Plugin Health Scoring

This page provides information about contributing to the Plugin Health Scoring code base.

Getting started

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.

  1. Clone the repository.

  2. Install tools

    1. Java 17

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

    3. Node 18.10.0 and Yarn 3.2.4

  3. Open the project in your favorite IDE.

Building

If you simply want the project binary, run:

mvn package -Dmaven.test.skip

Running locally

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]

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.

CLI

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.

Docker Compose

If you want to simply run the project locally, you can run:

mvn package -Dmaven.test.skip
docker compose up
Note
the required environment variables must be set in a file named .env.

Testing change

The project has unit and integration tests. You can run all those with

mvn verify
Warning
The integration tests requires Docker to be installed.

Proposing changes

All proposed changes are submitted and reviewed through a GitHub pull request. To submit a pull request:

  1. Create a branch prefixed with feature/ for a new enhancement, fix/ for a bugfix.

  2. Commit your changes to this new branch.

  3. Push the branch to your fork of the repository.

  4. In the GitHub Web UI, select the New pull request option.

  5. Fill in the pull request description.

  6. Click the Create pull request button.

The pull request will be built in ci.jenkins.io.