{"id":16139667,"url":"https://github.com/jimpriest/git-jira-branch-delete","last_synced_at":"2026-05-18T02:04:32.804Z","repository":{"id":39839977,"uuid":"243869204","full_name":"jimpriest/git-jira-branch-delete","owner":"jimpriest","description":"Python script which will parse your local Git branches and using the JIRA API  delete them based on their Jira status.","archived":false,"fork":false,"pushed_at":"2023-02-08T04:45:43.000Z","size":34,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T15:40:35.672Z","etag":null,"topics":["git","jira","python","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimpriest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-02-28T22:58:32.000Z","updated_at":"2023-07-12T13:48:58.000Z","dependencies_parsed_at":"2024-12-20T05:21:17.270Z","dependency_job_id":"e2342e58-84cd-4678-9c9f-3ac31741756b","html_url":"https://github.com/jimpriest/git-jira-branch-delete","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jimpriest/git-jira-branch-delete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimpriest%2Fgit-jira-branch-delete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimpriest%2Fgit-jira-branch-delete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimpriest%2Fgit-jira-branch-delete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimpriest%2Fgit-jira-branch-delete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimpriest","download_url":"https://codeload.github.com/jimpriest/git-jira-branch-delete/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimpriest%2Fgit-jira-branch-delete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["git","jira","python","python3"],"created_at":"2024-10-09T23:49:34.066Z","updated_at":"2026-05-18T02:04:32.785Z","avatar_url":"https://github.com/jimpriest.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Delete Local Git Branches Based on Jira Status\n\nThis is a hacked up Python script to parse local Git branches and use the Jira API to see which tickets are complete and delete those branches.\n\nThis all works on my Mac :)  YMMV\n\nPlease be careful as this does delete things. You have been warned.\n\n### Assumptions \nThis assumes you include your Jira ticket # in your branch names. We use: feature/KEY-1234_description\n\n\n### Requirements\n* Python 3\n* I'm using Jira v7.13\n* Recent version of Git\n* I'm using pipenv  (https://pipenv-fork.readthedocs.io/en/latest/basics.html)\n\n### Configuraton\nJira URL, key, username and password are stored in credentials.py - this should typically NOT be checked into source control. \n\nJira key is whatever you have prefixing your ticket numbers: FOO-1234 - \"FOO\" is the key. \n\nThere is an example credentials file included in the repository. Rename to credentials.py and enter your information. \n\nAgain make sure you do not commit credentials.py! \n\nModify the status in the script to whatever you use in your Jira project. For our project when it's Pending Release or Done we can delete the branch:\n\nticketstatusfordelete = [\"Done\", \"Pending Release\"]\n\n\n### Running \n* pipenv shell\n* python branchdelete.py\n\n```\njpriest: ~/www/git-jira-branch-delete (master=)$ pipenv shell python branchdelete.py \nLaunching subshell in virtual environment…\nbash-3.2$  . /Users/jpriest/.local/share/virtualenvs/git-jira-branch-delete-vVt7mrDH/bin/activate\n(git-jira-branch-delete) bash-3.2$ python branchdelete.py\nIssue 341 is In Review. Nothing to do!\nIssue 123 is Done! Branch deleted: feature/FOOBAR-123-report_JP_v172\nIssue 452 is Cancelled. Nothing to do!\nIssue 345 is Pending Merge. Nothing to do!\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimpriest%2Fgit-jira-branch-delete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimpriest%2Fgit-jira-branch-delete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimpriest%2Fgit-jira-branch-delete/lists"}