Skip to main content

Print a pull request title with labels derived from the topic branch name.

Project description

1. Environment

  • Python 3.14.6
  • pip 26.1.2

2. Installation

$ pipx install spreen-pr

(pip install spreen-pr works too if you prefer managing the environment yourself.)

For development, install the dependencies via requirements.txt:

$ pip install -r requirements.txt

3. Execution

$ pr-title hayat01sh1da/issue-89/service/improve-onboarding-flow
[service] Improve Onboarding Flow

With no argument, the current git branch is used:

$ git switch hayat01sh1da/issue-90/hotfix/service/fix_login_crash
$ pr-title
[Hotfix][service] Fix Login Crash

--format json exposes the labels separately for scripting and CI:

$ pr-title hayat01sh1da/issue-90/hotfix/service/fix_login_crash --format json
{"title": "[Hotfix][service] Fix Login Crash", "labels": ["Hotfix", "service"]}

As a library:

from spreen_pr import Application

Application.run(branch_name='hayat01sh1da/issue-89/service/improve-onboarding-flow')
# => '[service] Improve Onboarding Flow'

application = Application(branch_name='hayat01sh1da/issue-90/hotfix/service/fix_login_crash')
application.title   # => '[Hotfix][service] Fix Login Crash'
application.labels  # => ['Hotfix', 'service']

4. Unit Test

$ pytest
============================= test session starts ==============================
platform linux -- Python 3.14.6, pytest-9.1.1, pluggy-1.6.0
rootdir: spreen-pr/pypi
configfile: pyproject.toml
collected 15 items

test/test_application.py .........                                       [ 60%]
test/test_cli.py ......                                                  [100%]

============================== 15 passed in 0.12s ===============================

5. Static Code Analysis

$ flake8 .
$ autoflake8 --in-place --remove-duplicate-keys --remove-unused-variables --recursive .
$ autopep8 --in-place --aggressive --aggressive --recursive .

6. Type Checks

$ mypy .
Success: no issues found in 6 source files

7. Build

$ python -m build
$ pipx install ./dist/spreen_pr-0.1.1-py3-none-any.whl

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

spreen_pr-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spreen_pr-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file spreen_pr-0.1.1.tar.gz.

File metadata

  • Download URL: spreen_pr-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for spreen_pr-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca9e55d9543f0b7d4e2cedfe02b3677b340d63adbfef4efcb67871c333daed1a
MD5 abe80542668a5513b16ac94155369f64
BLAKE2b-256 4523087573c6196b565975bafd15c2b9cabb152b71e03c1305db7e1215768238

See more details on using hashes here.

Provenance

The following attestation bundles were made for spreen_pr-0.1.1.tar.gz:

Publisher: pypi--release.yml on hayat01sh1da/spreen-pr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spreen_pr-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: spreen_pr-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for spreen_pr-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48b8c67239837acd2fb3ebf02d25afcbf23a7ad048ae7d2c3beb4a26a411c5d3
MD5 61bc89b4b8bfd20aee2f53a4b4fdd550
BLAKE2b-256 6d439e439c15cf9d9e6090e8ca156f0f3c2e20ff20ac2798cdd11199969761b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spreen_pr-0.1.1-py3-none-any.whl:

Publisher: pypi--release.yml on hayat01sh1da/spreen-pr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page