Skip to main content

Simple script to list external contributors to a project who authored contributions between two specific references

Project description

External GitHub contributors

This is a simple script to get a list of external contributors that authored commits on a GitHub-hosted project within a range defined by two given Git references.

Install

This project uses Poetry to manage its dependencies. Poetry needs to be installed in order to be able to follow the installation and usage instructions.

Clone the repository and install the dependencies:

git clone https://github.com/babolivier/external-github-contributors.git
cd external-github-contributors
poetry install

Usage

In your local checkout of this repository, run poetry run external_github_contributors [args].

A complete synopsis is available below:

usage: external_github_contributors [-h] --team TEAM --repo REPO [--token TOKEN] [--md] oldest_ref most_recent_ref

Simple script to list external contributors to a project who authored contributions between two specific references.

positional arguments:
  oldest_ref       The oldest of the two refs to compare.
  most_recent_ref  The most recent of the two refs to compare.

options:
  -h, --help       show this help message and exit
  --team TEAM      The team listing internal contributors to exclude. In the format ORG_NAME/teams/TEAM_SLUG.
  --repo REPO      The repository to list contributors of. In the format ORG_NAME/REPO_NAME.
  --token TOKEN    The GitHub access token to use when making request to the API. Must have the read:org scope.
                   If not provided as a command-line argument, must be in the GITHUB_TOKEN environment variable.
  --md             If provided, prints the contributors as markdown links. The text for the link is the user's
                   display name (e.g. full name) as configured in their GitHub profile. This option requires an
                   additional API call for each contributor, and therefore introduces additional delay.

As an example, here's a run of the script to get the list of external contributors that committed to the matrix-org/synapse repository between Synapse 1.68 and Synapse 1.69:

poetry run external_github_contributors --team=matrix-org/teams/core-team --repo=matrix-org/synapse v1.68.0 v1.69.0
10 external contributors found after looking at 114 commits:
- ...

In this example, the GitHub access token is stored in the environment.

Contribute

Please report bugs as issues on this repository, although fixing them will be done on a best-effort basis. Pull requests are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

external_github_contributors-1.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file external_github_contributors-1.1.0.tar.gz.

File metadata

File hashes

Hashes for external_github_contributors-1.1.0.tar.gz
Algorithm Hash digest
SHA256 07e724062f7dc59a863aebac0a8e20af20695af18e6e7c7e9f2216e4833985cf
MD5 7744c7aaea1d9ff8a324747d12742c85
BLAKE2b-256 f01cdeda8f93096887dda5e7d37206edbb00068c755096d11d7476b3b8962b1d

See more details on using hashes here.

File details

Details for the file external_github_contributors-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for external_github_contributors-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc5657c03bcafce2201d640d812441a9942edc7055468b362e9c2b3cc20be29f
MD5 9ae8782dfbf86e59ddfe155736582160
BLAKE2b-256 865d893399510020711066345ffb49983c55c9848c58bca37d26570a18096e6d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page