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 can be installed via pip:

pip install external-github-contributors

Install from source

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

If you have installed this project using pip, run python -m external_github_contributors.

If you have installed this project from source, 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:

python -m 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.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for external_github_contributors-1.1.1.tar.gz
Algorithm Hash digest
SHA256 b7ec0757a97eb2f967648295f92d3445019fd84b7b85e956c1fce4319d24042a
MD5 dcd1ccad8694657904ea2b75d9cae7ed
BLAKE2b-256 4e76264e8e581b3817391621cb1e2b34d382c6b4b4894a2f0b21b3b6500c6653

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for external_github_contributors-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c222107bea7459f5aaf95a7ad30bea7665a15ed4967b842678032b5508474940
MD5 e6464eba7379404f87c89046effa3f10
BLAKE2b-256 242571839862a8eaca0b73d2bd6c1cf29796d4c9fc5517bb38c6ff802833213c

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