Examine a GitHub user's profile, to help quickly decide how much to invest in their contributions.
Project description
gh-profiler
Many of us have received waves of open source contributions where many of the new "contributions" aren't worth engaging with. gh-profiler lets you quickly see a snapshot of the submitter's profile, and recent PR activity.
This meant to give you some quick context about how much to invest in reviewing the PR. It's not meant to give an immediate signal to close the PR or issue.
Running as a tool
If you have uv installed, you can run this as a tool against any GitHub user:
$ uvx gh-profiler <redacted>
GitHub user: <redacted>
🟡 Account age: 159 days
🟢 Profile information:
name: <redacted>
blog: https://<redacted>.com
email: info@<redacted>.com
Empty fields: company, location, bio
🟢 <redacted> has opened fewer than 10 PRs in the last 21 days.
🔴 <redacted> has opened 6 new issues in the last 21 days.
🟢 0 issues have been closed as NOT_PLANNED.
🔴 6 issues were opened with the same title:
📋 Documentation Enhancement Suggestion (6)
If you're working in your local project directory, you can simply provide a PR or issue number. The tool will look up the PR or issue, identify the user who opened it, and give a report on that user:
$ uvx gh-profiler 8
Issue #8: Accept a username or an issue/ pr number.
Author: ehmatthes
🟢 Account age: 5,058 days
...
Installing and then running
You can also install the project, and then run the bare gh-profiler command:
(.venv) $ pip install gh-profiler
(.venv) $ gh-profiler ehmatthes
GitHub user: ehmatthes
🟢 Account age: 5,058 days
...
When you've installed the project, you can also run it as a module:
$ python -m gh_profiler <username>
Concise output
If you want just the simplest summary, you can pass the --concise flag:
$ uvx gh-profiler <redacted> --concise
GitHub user: <redacted>
🟡 Some concerns found with user's profile.
🟢 No concerns found with recent PR activity.
🔴 Significant concerns found with recent issue activity.
For a more detailed report, run `gh-profiler <redacted>`.
GitHub Actions
gh-profiler can write a GitHub Action that will automatically run gh-profiler --concise any time a new PR or issue is opened on your project. The output will be written as a comment on the new PR or issue.
The --generate-workflow flag does this by writing a profile_contributors.yml file to .github/workflows:
$ uvx gh-profiler --generate-workflow
This will generate a GitHub action that will automatically run gh-profiler
whenever someone opens a new issue or PR in your repository. The profile
output will be written as a comment on the issue or PR.
The workflow will be written at the following location:
/.../.github/workflows/profile_contributors.yml
Are you sure you want to do this? (y/n) y
The new workflow file was written:
/.../.github/workflows/profile_contributors.yml
To start seeing profiles when new issues and PRs are opened:
- Commit the workflow file to your main branch.
- Push your main branch to GitHub.
...
Maintaining
--redact
For live demos and screenshots, you can pass the --redact flag. The username and profile information sections will show "<redacted>" in place of identifying information:
$ uv run gh-profiler 39 --redact
Issue #39: Add a `--redact` flag
Author: <redacted>
🟢 Account age: 5,058 days
🟢 Profile information:
name: <redacted>
blog: <redacted>
...
Add/ modify a requirement
- Add or modify a requirement by modifying pyproject.toml, or running
uv add <package>. - For a dev dependency, run
uv add --dev <package>. - Then run
uv lock.
Running tests
$ uv run pytest
Profiling
$ uv run python -m cProfile -s cumtime -m gh_profiler ehmatthes > profile.txt
New releases
Update changelog and bump version, then:
$ uv lock
# Commit all changes.
$ git tag vX.Y.Z
$ git push origin vX.Y.Z
$ rm -rf dist/*
$ uv build
$ uv publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gh_profiler-0.5.1.tar.gz.
File metadata
- Download URL: gh_profiler-0.5.1.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2efd5e44b1d16bc8d1352ea00b4acb7df87fea55a62087bc51a1c85459575c3
|
|
| MD5 |
619b5b876b02c0ac4b6120dc09d723d9
|
|
| BLAKE2b-256 |
faf861a09f0ed5cbf03e1db3ea1607ab4224ceb67c368310ead2a31b67b8289b
|
File details
Details for the file gh_profiler-0.5.1-py3-none-any.whl.
File metadata
- Download URL: gh_profiler-0.5.1-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9caf6470c55e1aee894e89ed040db4d9ff0a1476754a1c55ab3767fafd76b3dc
|
|
| MD5 |
ea464ade3329f3a4a1aa2b2c284194a5
|
|
| BLAKE2b-256 |
373f6861864ddb85e9fe4e8fa3904b7781113cfac33d958d6ac76c1b59c51310
|