🚧 This project is in progress ...
The objective of this project is to highlight an organization's members for their open source contributions.
To do this, data is scanned from both GitHub and GitLab and saved in a database (e.g., GCP Firestore). Data is used to find and list projects maintained or forked by organization members, as well as their open source contributions (including contributed projects and dedicated Pull Requests / Merge Requests).
The tracked organization is configurable in the application settings.
Using:
- Quarkus
- Firestore to save data
- GitHub actions as CICD - to be implemented
- Javelit to display information
Available REST resources (/v1/):
/v1/github/to get information about organization members and organization from GitHub/v1/gitlab/to get information about organization members and organization from GitLab/v1/members/to get members information from database/v1/projects/to get projects information from database/v1/contributions/to get information about contributions, contributed projects, dedicated PRs/MRs, and external contributions from database (/v1/contributions/details,/v1/contributions/external,/v1/contributions/member/{memberId})/v1/workflow/to get data and save them on database
An interface made with Javelit is available.
http://localhost:8888to access the Javelit dashboard
The application automatically synchronizes data from GitHub and GitLab using scheduled tasks configured in Quarkus:
- Data Synchronization Schedule (
DataSyncSchedule.java):- Configuration:
datasync.cronproperty inapplication.properties(defaults to every Monday at 8:00 AM:0 0 8 ? * MON). - Development Mode: Configured to run every 10 minutes (
0 */10 * ? * *).
- Configuration:
- You need a GitHub token you can generate on this page.
- You need a GitLab token you can generate on this page.
- Create a
.envfile based on the.env-examplefile and set thegithub.tokenandgitlab.tokenvariables. - Create a
.gcloud-conf.jsonfile in the root of the project containing your Google Cloud service account key. This is required for the application to authenticate with GCP services. - Set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable to point to your key file. This is crucial for authentication in your local environment.export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/.gcloud-conf.json
- Run the application with
quarkus devif you have the Quarkus CLI installed on your environment, ormvn quarkus:devcommand. - Or start directly with the startup script:
A startup script
start.shis provided to automatically export variables from.env, setGOOGLE_APPLICATION_CREDENTIALSif.gcloud-conf.jsonis present, and launch Quarkus dev mode:(To only export variables into your current shell session without launching Quarkus:./start.sh
source ./start.sh) - You can use Quarkus dev service for Firestore enabling this variable
quarkus.google.cloud.firestore.devservice.enabledin application.properties file.
./mvnw packageStart by building the image:
docker build -t zoss-dashboard .Then run the container mapping the ports (8080 for API, 8888 for UI) and mounting the credentials:
docker run -it --rm \
-p 8080:8081 \
-v "$(pwd)/.gcloud-conf.json:/etc/gcp/creds.json:ro" \
--env-file .env \
-e GOOGLE_APPLICATION_CREDENTIALS=/etc/gcp/creds.json \
zoss-dashboardThis project can be deployed on Cloud Run with this command:
gcloud run deploy zenika-opensource-statistics \
--source . \
--region $GOOGLE_CLOUD_LOCATION \
--project $GOOGLE_CLOUD_PROJECT_ID \
--allow-unauthenticated \
--memory 1Gi \
--max-instances 1Anyone can contribute to this project. For the moment, please add your question or propose something in a new issue.
