Skip to main content

Installation

pip install github-pr-label

Example

import github_pr_label
label_group = "bot"
label_name = "pass"
gh_label = github_pr_label.PRLabel(
    pr_url = "your_pr/number"
)
gh_label.set_label(label_group,label_name)

label json file

for example label: bot have three status [pass,fail,skip] status: there are three parts to build a label and split by '|' name|colour|description

{
    "bot": {
        "replace":true,
        "pass": "bot:heavy_check_mark:|3CBF00|passed bot test",
        "fail": "bot:x:|3CBF00|failed bot test",
        "skip": "bot:p:|E50009|bot no required"
    },
    "size":{
        "replace":true,
        "XS": "size/XS|3CBF00|<10 lines",
        "S": "size/S|5D9801|>10 lines",
        "M": "size/M|7F7203|>30 lines",
        "L": "size/L|A14C05|>100 lines",
        "XL": "size/XL|C32607|>500 lines",
        "XXL": "size/XXL|E50009|>1000 lines"
    }, 
}

Size Auto Determination.

The Pull Request labels are applied depending on the total lines of code changed (additions + deletions).

Name Description
size/XS Denotes a PR that changes 0-9 lines.
size/S Denotes a PR that changes 10-29 lines.
size/M Denotes a PR that changes 30-99 lines.
size/L Denotes a PR that changes 100-499 lines.
size/XL Denotes a PR that changes 500-999 lines.
size/XXL Denotes a PR that changes 1000+ lines.

Metadata

Release files for github-pr-label 1.0.3

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

Source distribution (sdist)

Source distribution for github-pr-label 1.0.3
File Size Uploaded
github_pr_label-1.0.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for github-pr-label 1.0.3
File Interpreter ABI Platform
github_pr_label-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / github_pr_label-1.0.3.tar.gz

Download URL github_pr_label-1.0.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9818c4a8d71b8fb6f7281bf17af643148cb8676955f340f20d52f471ab65dacd
BLAKE2b-256 checksum
How to use checksums
99dfd599082fe688152eb9c1f8f1241daa5588a95699806b415a170b6a75ecef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6rc1

Release files / github_pr_label-1.0.3-py3-none-any.whl

Download URL github_pr_label-1.0.3-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc6ad092d9b228760bc39240dceff50ce3cdc6ea0a68ce26b43b1e9c70018948
BLAKE2b-256 checksum
How to use checksums
a4a68d4729454b9e339ce9b2e25055bcdf1fe06a2eacf5d286320dbe099dda14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6rc1

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

0.0.0

2 release files

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