Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdockerty/contributed-to
Display public contributions by a GitHub user.
https://github.com/jdockerty/contributed-to
github-api github-contributions github-graphql-api golang graphql
Last synced: about 1 month ago
JSON representation
Display public contributions by a GitHub user.
- Host: GitHub
- URL: https://github.com/jdockerty/contributed-to
- Owner: jdockerty
- Created: 2022-12-28T14:12:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-20T19:25:52.000Z (10 months ago)
- Last Synced: 2024-06-21T03:17:30.019Z (5 months ago)
- Topics: github-api, github-contributions, github-graphql-api, golang, graphql
- Language: Go
- Homepage: https://api.contributed.jdocklabs.co.uk
- Size: 215 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# contributed-to
An application which displays contributions, i.e. merged pull requests, that a user has made outside of their own projects.
## Usage
You can make a HTTP request yourself to `api.contributed.jdocklabs.co.uk/user/` to receive a JSON payload of information about a particular user.
### CLI
A small CLI is also available which can be installed using
```bash
go install github.com/jdockerty/contributed-to/cmd/contributed@latest
```By default, this points to `api.contributed.jdocklabs.co.uk` but can be altered using the `url` flag if you wish to host the application
on your own infrastructure with specific GitHub tokens.You can use the application by calling it like so
```bash
# Contributions by one or more users
contributed userOne userTwo# Verbose contribution information which includes the pull request title
# and permalink
contributed -full userOne userTwo
```## How it works
The application runs a simple web server which relays the requested GitHub username from the URL as a parameter into the GitHub API.
This utilises the [GraphQL GitHub API](https://docs.github.com/en/graphql) to fetch the relevant data about a user's merged pull requests, filtering by those which are
not their own projects, i.e. a repository under their GitHub username.The API call is relatively expensive in that it requests the entire history of merged pull requests until
there are no more remaining that GitHub has kept a record of. It also caches responses, meaning that the first request may take some time but subsequent requests are served
from the cache and are *blazingly* fast.