{"id":28916037,"url":"https://github.com/trash-panda-v91-beta/pumper","last_synced_at":"2025-10-11T01:06:00.447Z","repository":{"id":65902690,"uuid":"601998957","full_name":"trash-panda-v91-beta/pumper","owner":"trash-panda-v91-beta","description":"Automagically 🧚‍♀️ create branch, pull request, bump version (using Commitizen), approve and merge.","archived":false,"fork":false,"pushed_at":"2023-05-15T19:01:40.000Z","size":852,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T11:48:26.730Z","etag":null,"topics":["bump","conventional-commits"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trash-panda-v91-beta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-15T09:31:22.000Z","updated_at":"2023-09-15T23:00:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a33b3902-d2dd-48ce-a592-033e7fb9acaf","html_url":"https://github.com/trash-panda-v91-beta/pumper","commit_stats":null,"previous_names":["trash-panda-v91-beta/pumper","aka-raccoon/pumper"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/trash-panda-v91-beta/pumper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trash-panda-v91-beta%2Fpumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trash-panda-v91-beta%2Fpumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trash-panda-v91-beta%2Fpumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trash-panda-v91-beta%2Fpumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trash-panda-v91-beta","download_url":"https://codeload.github.com/trash-panda-v91-beta/pumper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trash-panda-v91-beta%2Fpumper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261206112,"owners_count":23124839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bump","conventional-commits"],"created_at":"2025-06-21T23:07:43.669Z","updated_at":"2025-10-11T01:06:00.434Z","avatar_url":"https://github.com/trash-panda-v91-beta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable-file no-inline-html first-line-h1 --\u003e\n\u003cdiv align=\"center\"\u003e\n\n# pumper\n\n[![PyPI - Version](https://img.shields.io/pypi/v/pumper.svg)](https://pypi.org/project/pumper) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pumper.svg)](https://pypi.org/project/pumper) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github.com/pycqa/isort)\n\nAutomagically 🧚‍♀️ create branch, pull request, bump version (using [`Commitizen`](https://commitizen-tools.github.io/commitizen/)), approve and merge.\n\n\u003c/div\u003e\n\n---\n\n`pumper` helps create CI/CD `bump version` jobs more secure 👮‍♀️.\n\n**Common version bump strategy** these days is to have CI/CD workflow run automatic version bump directly in a main branch:\n\n![common-bump-strategy](docs/common-bump-strategy.excalidraw.png)\n\nThis raises following concerns (among others) in highly secured environments:\n\n- direct push to a main branch required\n- branch protection rules needs to be relieved\n- change in main branch is not reviewed\n\n**Bump strategy with `pumper`:**\n\n![pumper-strategy](docs/pumper-strategy.excalidraw.png)\n\n1. Call **great** tool [`Commitizen`](https://commitizen-tools.github.io/commitizen/). It checks your commit history and bumps your version. Check it out for more information how to configure and use it.\n2. Create a branch including changes from above step a push it.\n3. Create PR.\n4. Optionally approve a merge PR.\n\n## Quick install guide\n\n`pumper` can be installed from [PYPI](https://pypi.org/project/pumper). It's recommended to install it in isolated Python environment using [venv](https://docs.python.org/3/tutorial/venv.html).\n\n```bash\npython -m venv .venv\n.venv/bin/pip install pumper\n```\n\n## How to use it\n\n### Using CLI\n\n#### `pump create`\n\n```bash\n Usage: pumper create [OPTIONS]\n\n Bump version, push branch and create pull request.\n\n╭─ Options ──────────────────────────────────────────────────────────────────────╮\n│ *  --repo            TEXT  The owner and repository name, eg 'owner/repo'.     │\n│                            [env var: GITHUB_REPOSITORY]                        │\n│                            [default: None]                                     │\n│                            [required]                                          │\n│    --url             TEXT  Github API url.                                     │\n│                            [env var: GITHUB_API_URL]                           │\n│                            [default: https://api.github.com]                   │\n│ *  --token           TEXT  Github token.   [env var: GITHUB_TOKEN]             │\n│                            [default: None] [required]                          │\n│    --base            TEXT  Base branch of a PR. [env var: BASE_BRANCH]         │\n│                            [default: main]                                     │\n│    --branch          TEXT  Branch name and PR title.                           │\n│                            [default: release/{version}]                        │\n│    --user            TEXT  Git user name. [default: github-actions[bot]]       │\n│    --email           TEXT  Git user email.                                     │\n│                            [default:                                           │\n│                            github-actions[bot]@users.noreply.github.com]       │\n│    --gh-env                Create 'PR_NUM' env var for GH actions              │\n│    --label           TEXT  Add labels to PR. [default: None]                   │\n│    --assign                Assign PR [default: True]                           │\n│    --assignee        TEXT  PR assignee name. [env var: GITHUB_ACTOR]           │\n│    --help                  Show this message and exit.                         │\n╰────────────────────────────────────────────────────────────────────────────────╯\n```\n\n#### `pumper approve`\n\n```bash\n Usage: pumper approve [OPTIONS] PR_NUM\n\n Approve pull request.\n\n╭─ Arguments ────────────────────────────────────────────────────────────────────╮\n│ *    pr_num      INTEGER  PR number. [env var: PR_NUM] [default: None]         │\n│                           [required]                                           │\n╰────────────────────────────────────────────────────────────────────────────────╯\n╭─ Options ──────────────────────────────────────────────────────────────────────╮\n│ *  --repo         TEXT  The owner and repository name, eg 'owner/repo'.        │\n│                         [env var: GITHUB_REPOSITORY]                           │\n│                         [default: None]                                        │\n│                         [required]                                             │\n│    --url          TEXT  Github API url.                                        │\n│                         [env var: GITHUB_API_URL]                              │\n│                         [default: https://api.github.com]                      │\n│ *  --token        TEXT  Github token. [env var: GITHUB_TOKEN] [default: None]  │\n│                         [required]                                             │\n│    --body         TEXT  PR message. [default: 🤖 Approved by GH actions!]      │\n│    --help               Show this message and exit.                            │\n╰────────────────────────────────────────────────────────────────────────────────╯\n```\n\n#### `pumper merge`\n\n```bash\n Usage: pumper merge [OPTIONS] PR_NUM\n\n Merge pull request.\n\n╭─ Arguments ───────────────────────────────────────────────────────────────────╮\n│ *    pr_num      INTEGER  PR number. [env var: PR_NUM] [default: None]        │\n│                           [required]                                          │\n╰───────────────────────────────────────────────────────────────────────────────╯\n╭─ Options ─────────────────────────────────────────────────────────────────────╮\n│    --method        [merge|squash|rebase]  The merge method to use.            │\n│                                           [default: merge]                    │\n│ *  --repo          TEXT                   The owner and repository name, eg   │\n│                                           'owner/repo'.                       │\n│                                           [env var: GITHUB_REPOSITORY]        │\n│                                           [default: None]                     │\n│                                           [required]                          │\n│    --url           TEXT                   Github API url.                     │\n│                                           [env var: GITHUB_API_URL]           │\n│                                           [default: https://api.github.com]   │\n│ *  --token         TEXT                   Github token.                       │\n│                                           [env var: GITHUB_TOKEN]             │\n│                                           [default: None]                     │\n│                                           [required]                          │\n│    --help                                 Show this message and exit.         │\n╰───────────────────────────────────────────────────────────────────────────────╯\n```\n\n### Github actions\n\nSee my GH actions [`bumper.yaml` workflow](.github/workflows/bumper.yaml). Replace `pip install .` with `pip install pumper==0.2.0` (line 31).\n\n#### Required setup\n\n- [Allow GitHub Actions to create and approve pull requests](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests) in your repository settings.\n- Depending on which token you want to use:\n    - Actions [`GITHUB_TOKEN` needs following permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token):\n\n        ```yaml\n        permissions:\n          pull-requests: write\n          contents: write\n        ```\n\n    - Github personal access tokens (classic) needs `public_repo` scope for public repositories or full `repo` scope for a private repositories.\n\n## Appreciation\n\nBig thanks 🙏 to following libraries:\n\n- [`Commitizen`](https://commitizen-tools.github.io/commitizen/)\n- [`PyGithub`](https://github.com/PyGithub/PyGithub)\n- [`Rich`](https://github.com/Textualize/rich)\n- [`Typer`](https://typer.tiangolo.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrash-panda-v91-beta%2Fpumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrash-panda-v91-beta%2Fpumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrash-panda-v91-beta%2Fpumper/lists"}