data from
.all-contributorsrc
across public GitHub repositories.
This repository is a self-updating data provider of endorsements that are gather automatically across public GitHub repositories.
You can find the latest data at data/endorsements.csv
In order to be notified about updates, install the all-contributors-import app on a repository where you want to handle the update.
To see an example of how to handle updates, see .github/workflows/subscribe.yml.
We only pass the startSeq
and endSeq
as part of the update because repository dispatch payloads are limited in size. But you can download the latest version of data/endorsements.csv
at https://raw.githubusercontent.com/all-contributors/import/main/data/endorsements.csv and then filter out based on the provided sequence numbers.
In order to run the import script, you need to define a GITHUB_TOKEN
environment variable to a personal access token with the public_repo
scope (create one).
GITHUB_TOKEN=... npx all-contributors-import
If you would like to write the unformated logs to a separate file you can run this command on Linux or macOS
GITHUB_TOKEN=... npx all-contributors-import | tee .results/import.jsonl | npx pino-pretty
This repository consists of
- The import script (entry point: /bin/cli.js)
- The imported data: /data
- A workflow to run the import each day: .github/workflows/update.yml
- A script to notify everyone interested about an update: scripts/notify.js
- Find
.all-contributorsrc
files- In public GitHub repositories using
GET /search/code
API - Based on existing data in data/endorsements.csv
- Update
data/endorsements.csv
with all new files and latest update meta data
- In public GitHub repositories using
- Retrieve commits for each file using GraphQL (as it's easier to retrieve associated pull requests and author user information)
- If it's a new file, retrieve all commits
- If existing endorsement have been sourced before, retrieve all commits after that
- Calculate the difference of the
.all-contributorsrc
file for each version and store separate endorsements in.results/endorsements.csv
The scripts/notify.js script is called as part of the daily update workflow. The script is called with the credentials of the all-contributors-import app. The script iterates through all repositories the app is installed in and creates a repository dispatch event with event_type
set to all-contributors-import:update
and client_payload
set to { startSeq, endSeq }
OpenSauced provides insights into open source projects by using data science in git commits.