This project is a Java application that interacts with the GitHub API to retrieve information about pull requests.
To build the project, make sure you have Maven installed. Then, run the following command:
mvn clean install
This will compile the code, run tests, and create an executable JAR file in the target
directory.
Before running the application, you need to obtain a GitHub token with the "read:org" permission. Follow the steps below to create a token:
-
Login to GitHub
-
Navigate to Settings: Click on your profile picture in the top right corner of GitHub and select "Settings" from the dropdown menu.
-
Access Developer Settings: In the left sidebar, click on "Developer settings."
-
Generate a New Token:
- Click on "Personal access tokens" under "Access tokens."
- Under "Select scopes," ensure that only the "read:org" permission is selected.
- Click "Generate token."
-
Copy the Token
After building the project, you can run the application using the generated JAR file. Use the following command:
java -jar target/quarkus-pr-info.jar <GitHub-token> [<startDate> <endDate>]
<GitHub-token>
: Your GitHub personal access token.<startDate>
: Optional. Start date in the format dd-MM-yyyy (e.g., 25-02-2022).<endDate>
: Optional. End date in the format dd-MM-yyyy (e.g., 25-02-2022).
-
Get all pull requests:
java -jar target/quarkus-pr-info.jar <GitHub-token>
-
Get pull requests after a specific start date:
java -jar target/quarkus-pr-info.jar <GitHub-token> 20-02-2022
-
Get pull requests between a start and end date:
java -jar target/quarkus-pr-info.jar <GitHub-token> 01-01-2022 01-01-2023