Skip to main content

Python decorator that will automatcially create an issue on GitHub if a decorated function throws an exception

Reason this release was yanked:

Wrong versioning

Project description

gicd

gicd is a Python decorator that will automatcially create an issue on GitHub if a decorated function throws an exception. That's it!

Requirements

  • The GitHub CLI (gh)

Usage

Decorate a function with it:

from gicd import auto_create_issue

@auto_create_issue(repo_owner="zmarffy", repo_name="cli-test-repo", exceptions=(IndexError, ValueError))
def error_prone_function():
    if input("Don't type anything; just hit enter... "):
        raise ValueError("Explosions!")
    print("All good!")

Then call the function:

error_prone_function()

On the off chance that the function raises an exception, it will create a issue in the GitHub repo specified in the decorator.

You can have it do this with all exceptions (default behavior), or, if you specify the exceptions parameter, it will only create an issue when those specific exceptions are thrown.

There's really not that much else to say about this tiny, somewhat humorous, tool.

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

gicd-1.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

gicd-1.0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file gicd-1.0.1.tar.gz.

File metadata

  • Download URL: gicd-1.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for gicd-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f7f3dfff8a3206f31fe9454943b12b788dd8180813185dc24016ceaad28cf859
MD5 025ed3cf1885ab2c9dd40ae30350e3d5
BLAKE2b-256 fca0d84571e7af39e42dcdc2e06d598b53538b82128e69616099a0a4185b7bb5

See more details on using hashes here.

File details

Details for the file gicd-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gicd-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.2

File hashes

Hashes for gicd-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8225830f75f08f5f8596932c00d491d16e9978d5402d0076de8089742671eb44
MD5 faca2f04984de9c49cf96d44e0cf27cc
BLAKE2b-256 32419cd016755a21e1c58ef27fb65c50cb0de0b587cdd86f72ad939999b562c7

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