skillfed

pr-commenter

Create and manage automatic comments in a Github PR

pr-commenter v0.2.4 123.4K downloads/30d#11,907 on PyPI1
Permissive license AGING released

What it is and what it does

pr-commenter is a command-line tool for programmatically posting and managing comments on GitHub pull requests. It reads comment content from files, stdin, or environment variables, optionally processes it through Jinja2 templates, and posts it to a specified PR. The tool tracks comments using hidden metadata, allowing subsequent runs to find, update, or hide previous comments of the same type—useful for CI systems that need to post incremental results (like test failures) across multiple build runs on the same commit.

The package depends on pygithub for GitHub API interaction, docopt-ng for CLI argument parsing, and Jinja2 for template rendering. It requires Python 3.7 or later and a GitHub token with repo scope. The tool is designed for integration into CI/CD pipelines where multiple jobs need to coordinate comment updates on the same PR.

Use it for:

  • Post test failure summaries from CI jobs to pull requests, aggregating results from multiple test suites
  • Update build status or deployment progress comments without creating duplicates across repeated runs
  • Append incremental analysis results (linting, coverage, performance metrics) to a single PR comment
  • Hide or replace outdated comments when a new commit is pushed, keeping PR discussions clean
  • Template-driven comment generation that includes environment variables and dynamic content from build logs

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A CLI tool that creates, updates, and manages automatic comments on GitHub pull requests, with support for templating and content from files or stdin.

Yes, with conditions. The tool is straightforward to install and solves a real CI/CD problem—coordinating comment updates across multiple build jobs. However, the aging maintenance (532 days since previous release, 1 star) and minimal community adoption suggest limited real-world validation. Install if you have a specific need for templated, idempotent PR comments in your CI pipeline and are comfortable maintaining a lightly-used dependency.

Install

pr-commenter on PyPI

pip

pip install pr-commenter

uv

uv add pr-commenter

poetry

poetry add pr-commenter

Installing pr-commenter

Before you install

Low friction: pure Python wheel with three straightforward dependencies (pygithub, docopt-ng, Jinja2). Last release was recent (2025-02-28), but the project shows aging maintenance signals with 532 days since the previous release and minimal community engagement (1 star).

License in practice

Permissive BSD license allows use in most contexts without restriction, though the exact license text is not specified in the package metadata.

Quickstart

pip install pr-commenter

export PR_COMMENTER_GITHUB_TOKEN=your_github_token
pr-commenter your/repo 12 comment.txt

# Or from stdin:
cat comment.txt | pr-commenter your/repo 12 -

Requires a GitHub token with 'repo' scope exported as PR_COMMENTER_GITHUB_TOKEN environment variable; Python >=3.7

Verify before relying

  • Whether the package works reliably with modern GitHub API versions and authentication methods
  • Community adoption and real-world usage patterns beyond the documented examples
  • Performance characteristics when managing many comments or large PR histories

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — pygithub, docopt-ng, Jinja2
Maintenance aging — 532 days since the last release
Last repo commit
First released
Downloads 123,444/month — #11,907 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pr_commenter-0.2.4-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Topic :: CommunicationsTopic :: Software Development :: Build Tools

Tags

github pr automated commentsgithub pull request comment managementci build result commentsautomated github notificationspr comment templatinggithub api comment updatesci integration github comments
github-integrationci-cdcli-tool

More Build Tools packages