Skip to main content

github-pr-log-commenter

Simple script that posts a comment to a Github PR based on a jinja2 template. This template has two simple variables:

{{pullRequestAuthor}}: Will be replaced by the author of the pull request

{{contents}}: Will be replaced by the contents of a given file (e.g. a log)

You need to define the GH_TOKEN environment variable with at least the repo scope.

usage:

usage: github-pr-commenter.py [-h] repo prnumber template logfile

positional arguments:
  repo        Organization and repository (e.g. xbmc/repo-plugins)
  prnumber    PR number (e.g. 5)
  template    Jinja 2 template file to generate a comment from
  logfile     Log file to parse (e.g. mylog.log)

optional arguments:
  -h, --help  show this help message and exit

Example template

## Something was successfull
Hey @{{pullRequestAuthor}},
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.


<details>
  <summary>
    <strong>
     Expand log file
    </strong>
  </summary>

` ` `
{{contents}}
` ` `

Metadata

Release files for gh-pr-commenter 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh-pr-commenter 1.0.0
File Size Uploaded Provenance Actions
gh-pr-commenter-1.0.0.tar.gz 2.8 kB Without provenance Details for gh-pr-commenter-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gh-pr-commenter 1.0.0
File Interpreter ABI Platform Actions
gh_pr_commenter-1.0.0-py3-none-any.whl Python 3 none any Details for gh_pr_commenter-1.0.0-py3-none-any.whl

Total release size: 12.7 kB

Release files / gh-pr-commenter-1.0.0.tar.gz

Download URL gh-pr-commenter-1.0.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
003ab4986f1ce66e7e326ddab2a9414e0c9bf7cc549cd196ce0bb31a84f06d31
BLAKE2b-256 checksum
How to use checksums
0e79f5b20227cd771d54b72acf3b9b80f47cb5419fe60187bf090d2f43bf9eaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release files / gh_pr_commenter-1.0.0-py3-none-any.whl

Download URL gh_pr_commenter-1.0.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1ebe911a31381ca321b5a7457cbcc63b0e4f296f096fa64b513e5bcd6c86a4e
BLAKE2b-256 checksum
How to use checksums
9c0c04f451e94f838f4a33b583dff78754fd82c256eaa8cc98e6b72d5ca7f62e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Security for gh-pr-commenter 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page