Package: pumper
pumperAutomagically 🧚‍♀️ create branch, pull request, bump version (usingCommitizen), approve and merge.pumperhelps create CI/CDbump versionjobs more secure 👮‍♀️.Common version bump strategythese days is to have CI/CD workflow run automatic version bump directly in a main branch:This raises following concerns (among others) in highly secured environments:direct push to a main branch requiredbranch protection rules needs to be relievedchange in main branch is not reviewedBump strategy withpumper:CallgreattoolCommitizen. It checks your commit history and bumps your version. Check it out for more information how to configure and use it.Create a branch including changes from above step a push it.Create PR.Optionally approve a merge PR.Quick install guidepumpercan be installed fromPYPI. It's recommended to install it in isolated Python environment usingvenv.python-mvenv.venv
.venv/bin/pipinstallpumperHow to use itUsing CLIpump createUsage:pumpercreate[OPTIONS]Bumpversion,pushbranchandcreatepullrequest.

╭─Options──────────────────────────────────────────────────────────────────────╮
│*--repoTEXTTheownerandrepositoryname,eg'owner/repo'.│
│[envvar:GITHUB_REPOSITORY]│
│[default:None]│
│[required]│
│--urlTEXTGithubAPIurl.│
│[envvar:GITHUB_API_URL]│
│[default:https://api.github.com]│
│*--tokenTEXTGithubtoken.[envvar:GITHUB_TOKEN]│
│[default:None][required]│
│--baseTEXTBasebranchofaPR.[envvar:BASE_BRANCH]│
│[default:main]│
│--branchTEXTBranchnameandPRtitle.│
│[default:release/{version}]│
│--userTEXTGitusername.[default:github-actions[bot]]│
│--emailTEXTGituseremail.│
│[default:│
│github-actions[bot]@users.noreply.github.com]│
│--gh-envCreate'PR_NUM'envvarforGHactions│
│--labelTEXTAddlabelstoPR.[default:None]│
│--assignAssignPR[default:True]│
│--assigneeTEXTPRassigneename.[envvar:GITHUB_ACTOR]│
│--helpShowthismessageandexit.│
╰────────────────────────────────────────────────────────────────────────────────╯pumper approveUsage:pumperapprove[OPTIONS]PR_NUMApprovepullrequest.

╭─Arguments────────────────────────────────────────────────────────────────────╮
│*pr_numINTEGERPRnumber.[envvar:PR_NUM][default:None]│
│[required]│
╰────────────────────────────────────────────────────────────────────────────────╯
╭─Options──────────────────────────────────────────────────────────────────────╮
│*--repoTEXTTheownerandrepositoryname,eg'owner/repo'.│
│[envvar:GITHUB_REPOSITORY]│
│[default:None]│
│[required]│
│--urlTEXTGithubAPIurl.│
│[envvar:GITHUB_API_URL]│
│[default:https://api.github.com]│
│*--tokenTEXTGithubtoken.[envvar:GITHUB_TOKEN][default:None]│
│[required]│
│--bodyTEXTPRmessage.[default:🤖ApprovedbyGHactions!]│
│--helpShowthismessageandexit.│
╰────────────────────────────────────────────────────────────────────────────────╯pumper mergeUsage:pumpermerge[OPTIONS]PR_NUMMergepullrequest.

╭─Arguments───────────────────────────────────────────────────────────────────╮
│*pr_numINTEGERPRnumber.[envvar:PR_NUM][default:None]│
│[required]│
╰───────────────────────────────────────────────────────────────────────────────╯
╭─Options─────────────────────────────────────────────────────────────────────╮
│--method[merge|squash|rebase]Themergemethodtouse.│
│[default:merge]│
│*--repoTEXTTheownerandrepositoryname,eg│
│'owner/repo'.│
│[envvar:GITHUB_REPOSITORY]│
│[default:None]│
│[required]│
│--urlTEXTGithubAPIurl.│
│[envvar:GITHUB_API_URL]│
│[default:https://api.github.com]│
│*--tokenTEXTGithubtoken.│
│[envvar:GITHUB_TOKEN]│
│[default:None]│
│[required]│
│--helpShowthismessageandexit.│
╰───────────────────────────────────────────────────────────────────────────────╯Github actionsSee my GH actionsbumper.yamlworkflow. Replacepip install .withpip install pumper==0.2.0(line 31).Required setupAllow GitHub Actions to create and approve pull requestsin your repository settings.Depending on which token you want to use:ActionsGITHUB_TOKENneeds following permissions:permissions:pull-requests:writecontents:writeGithub personal access tokens (classic) needspublic_reposcope for public repositories or fullreposcope for a private repositories.AppreciationBig thanks 🙏 to following libraries:CommitizenPyGithubRichTyper