{"id":14155403,"url":"https://github.com/ccntrq/git-jira-branch","last_synced_at":"2025-04-27T19:33:05.458Z","repository":{"id":204037629,"uuid":"704047314","full_name":"ccntrq/git-jira-branch","owner":"ccntrq","description":"Manage branches for your Jira tickets","archived":false,"fork":false,"pushed_at":"2025-04-17T07:38:21.000Z","size":1509,"stargazers_count":17,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T18:17:03.222Z","etag":null,"topics":["effect-ts","git","jira","productivity"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/git-jira-branch","language":"TypeScript","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/ccntrq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-10-12T12:34:07.000Z","updated_at":"2025-04-17T10:09:09.000Z","dependencies_parsed_at":"2023-12-28T11:43:14.270Z","dependency_job_id":"0ca54760-d6db-449d-937e-b4afab9f76de","html_url":"https://github.com/ccntrq/git-jira-branch","commit_stats":{"total_commits":355,"total_committers":3,"mean_commits":"118.33333333333333","dds":"0.49577464788732395","last_synced_commit":"c096f6fd56c48fb36040043dc537902e32278abf"},"previous_names":["ccntrq/git-create-jira-branch","ccntrq/git-jira-branch"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccntrq%2Fgit-jira-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccntrq%2Fgit-jira-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccntrq%2Fgit-jira-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccntrq%2Fgit-jira-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccntrq","download_url":"https://codeload.github.com/ccntrq/git-jira-branch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251196423,"owners_count":21550950,"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":["effect-ts","git","jira","productivity"],"created_at":"2024-08-17T08:03:02.211Z","updated_at":"2025-04-27T19:33:05.435Z","avatar_url":"https://github.com/ccntrq.png","language":"TypeScript","funding_links":[],"categories":["productivity"],"sub_categories":[],"readme":"# git-jira-branch - Manage branches for your Jira tickets\n\n\u003cp align=\"center\"\u003e\n  \u003cimg\n    title=\"git-jira-branch Logo\"\n    alt=\"git-jira-branch Logo\"\n    src=\"./assets/gjb-logo.svg\"\n  \u003e\n\u003c/p\u003e\n\nCreates feature branches based on your Jira tickets type and description.\n\n```bash\n$ git jira-branch create MYAPP-1234\n\u003e Successfully created branch: 'feat/MYAPP-1234-sluggified-description-used-as-branchname'\n```\n\n\u003c!-- vscode-markdown-toc --\u003e\n\n- [Usage](#Usage)\n  - [Create a new branch from your current `HEAD`](#CreateanewbranchfromyourcurrentHEAD)\n  - [Create a new branch based on some other revision](#Createanewbranchbasedonsomeotherrevision)\n  - [Reset an already existing branch](#Resetanalreadyexistingbranch)\n  - [Open tickets in your browser](#Openticketsinyourbrowser)\n  - [Show ticket info on your terminal](#Showticketinfoonyourterminal)\n  - [List branches associated with jira tickets](#Listbranchesassociatedwithjiratickets)\n  - [`wizard` mode](#wizardmode)\n- [Setup](#Setup)\n  - [Install](#Install)\n  - [Configuration](#Configuration)\n    - [For Jira Cloud](#ForJiraCloud)\n    - [For Jira Data Center](#ForJiraDataCenter)\n  - [Setup shell completions](#Setupshellcompletions)\n- [Contributors](#Contributors)\n- [Technologies used](#Technologiesused)\n- [License](#License)\n\n\u003c!-- vscode-markdown-toc-config\n\tnumbering=false\n\tautoSave=true\n\t/vscode-markdown-toc-config --\u003e\n\u003c!-- /vscode-markdown-toc --\u003e\n\n## \u003ca name='Usage'\u003e\u003c/a\u003eUsage\n\nSince this command starts with `git-` all commands can be run via\n`git-jira-branch` or as a git subcommand with `git jira-branch`.\n\nDue to a limitation in the awesome [cli\nlibrary](https://github.com/Effect-TS/cli) used, all options must be passed\nbefore the jira ticket key argument.\n\n### \u003ca name='CreateanewbranchfromyourcurrentHEAD'\u003e\u003c/a\u003eCreate a new branch from your current `HEAD`\n\nUsing the default JIRA_KEY_PREFIX\n\n```bash\ngit-jira-branch create 1324\n```\n\nOr fully specified:\n\n```bash\ngit-jira-branch create MYAPP-1234\n```\n\n### \u003ca name='Createanewbranchbasedonsomeotherrevision'\u003e\u003c/a\u003eCreate a new branch based on some other revision\n\nTo create a new branch based on your `master` branch:\n\n```bash\ngit-jira-branch create -b master MYAPP-1234\n```\n\n### \u003ca name='Resetanalreadyexistingbranch'\u003e\u003c/a\u003eReset an already existing branch\n\nPass the `-r|--reset` flag to reset an already existing branch to the current\n`HEAD` or the specified base revision (with `-b`)\n\n```bash\ngit-jira-branch create -r MYAPP-1234\n```\n\n### Switch to an already existing branch that is associated with a Jira ticket\n\nTo switch to an already existing branch that is associated with a Jira ticket\nyou can use the `switch` command.\n\n```bash\ngit-jira-branch switch MYAPP-1234\n```\n\n### \u003ca name='Openticketsinyourbrowser'\u003e\u003c/a\u003eOpen tickets in your browser\n\n1. For the current branch:\n   ```bash\n   $ git jira-branch open\n   \u003e Opening ticket url 'https://gcjb.atlassian.net/browse/GCJB-164' in your default browser...\n   ```\n2. For a given ticket:\n   ```bash\n   $ git jira-branch open GCJB-1234\n   \u003e Opening ticket url 'https://gcjb.atlassian.net/browse/GCJB-1234' in your default browser...\n   ```\n\n### \u003ca name='Showticketinfoonyourterminal'\u003e\u003c/a\u003eShow ticket info on your terminal\n\nThe `info` command shows the information for ticket nicely rendered for\nconsumtpion in the terminal.\n\nBy default info is show for the ticket associated with the current branch.\nAlternatively a ticket key can be passed as an argument to show info for that\nticket.\n\n```bash\n$ git jira-branch info\n```\n\nWill create output like this:\n\n\u003e \u003cins\u003e**GCJB-1** - Ticket summary\u003c/ins\u003e\u003c/br\u003e\n\u003e \u003cins\u003e**Task** | **Status**: To Do | **Creator**: Alexander Pankoff | **Assignee**: Alexander Pankoff\u003c/ins\u003e\n\u003e\n\u003e Long lines in the description of the ticket are wrapped to fit a line width of\u003cbr\u003e\n\u003e 80 characters to make it easier to read.\n\n### \u003ca name='Listbranchesassociatedwithjiratickets'\u003e\u003c/a\u003eList branches associated with jira tickets\n\n```bash\n$ git jira-branch list\n\u003e * feat/GCJB-1-e2e-test-ticket-with-a-fancy-summary\n\u003e   feat/GCJB-2-another-ticket-that-looks-like-its-associated-with-a-jira-ticket\n```\n\n### \u003ca name='wizardmode'\u003e\u003c/a\u003e`wizard` mode\n\nUse the `--wizard` option to enter `wizard` mode. This will prompt you for the\nJira ticket key and additional options and build the appropriate command line\nfor you.\n\n```bash\ngit-jira-branch --wizard\n```\n\n## \u003ca name='Setup'\u003e\u003c/a\u003eSetup\n\n### \u003ca name='Install'\u003e\u003c/a\u003eInstall\n\nThe cli can be installed from `npm`. It assumes you have git installed on your\nsystem and the `git` command to be available on your `$PATH`.\n\n```bash\nnpm i -g git-jira-branch\n```\n\n### \u003ca name='Configuration'\u003e\u003c/a\u003eConfiguration\n\n#### \u003ca name='ForJiraCloud'\u003e\u003c/a\u003eFor Jira Cloud\n\n1. Create a Jira API Token [See Jira\n   Docs](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/)\n1. Add the created API Token, your login email, the base url of your Jira\n   instance and optionally a default Jira key prefix to your environment.\n   For example in your `.bashrc` or `.zshrc`:\n   ```bash\n   export JIRA_USER_EMAIL=\"YOUR_JIRA_LOGIN_EMAIL\"\n   export JIRA_API_TOKEN=\"YOUR_API_TOKEN\"\n   export JIRA_API_URL=\"https://jira.mycompany.com\"\n   export JIRA_KEY_PREFIX=\"MYAPP\"\n   ```\n\n#### \u003ca name='ForJiraDataCenter'\u003e\u003c/a\u003eFor Jira Data Center\n\n1. Create a Jira PAT (Personal Access Token) [See Jira\n   Docs](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html)\n1. Add the created Jira PAT, the base url of your Jira instance and optionally a\n   default Jira key prefix to your environment.\n   For example in your `.bashrc` or `.zshrc`:\n   ```bash\n   export JIRA_PAT=\"YOUR_PERSONAL_ACCESS_TOKEN\"\n   export JIRA_API_URL=\"https://jira.mycompany.com\"\n   export JIRA_KEY_PREFIX=\"MYAPP\"\n   ```\n\n### \u003ca name='Setupshellcompletions'\u003e\u003c/a\u003eSetup shell completions\n\nThe cli can generate shell completion scripts for `bash`,`zsh` and `fish`. To\ngenerate and print the script for your shell run:\n\n```bash\ngit-jira-branch --completions (bash|zsh|fish)\n```\n\nTo install the completions for your shell, run the above command and pipe the\noutput to a file and source it in your shell config.\n\nE.g. for `bash`:\n\n```bash\ngit-jira-branch --completions bash \u003e ~/.git-jira-branch-bash-completions\necho \"source \\$HOME/.git-jira-branch-bash-completions\" \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\n\n## \u003ca name='Contributors'\u003e\u003c/a\u003eContributors\n\n- Alexander Pankoff ([@ccntrq](https://github.com/ccntrq))\n- Jakob Friedrich ([@jakobtfr](https://github.com/jakobtfr))\n- Taylor Falk ([@taytayp](https://github.com/taytayp) [@tfalkarkea](https://github.com/tfalkarkea))\n\n## \u003ca name='Technologiesused'\u003e\u003c/a\u003eTechnologies used\n\nThis project was started as an excuse to explore the\n[Effect](https://effect.website/) ecosystem and was written with only\n`@effect/*` packages as it's runtime dependencies. It uses:\n\n| Package                                                        | Usage                                                                                                                             |\n| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| [effect](https://github.com/Effect-TS/effect)                  | The core effect system and runtime.                                                                                               |\n| [@effect/cli](https://github.com/Effect-TS/cli)                | Command line handling and option parsing.\u003cbr\u003eThe `wizard` mode and `--completions` option are automatically provided by this lib. |\n| [@effect/platform](https://github.com/Effect-TS/platform)      | For its http client.                                                                                                              |\n| [@effect/platform-node](https://github.com/Effect-TS/platform) | For its shell command executor.                                                                                                   |\n\nIt uses the Jira API to fetch the details for a ticket and calls out directly to `git` for branch creation.\n\nTests were written using [`vitest`](https://vitest.dev). The testsuite can be run using `pnpm test`.\n\n## \u003ca name='License'\u003e\u003c/a\u003eLicense\n\nThe code in this repository is licensed under the [MIT License](/LICENSE).\nPlease note that the MIT License applies only to the code in this repository and\nnot to any other assets, especially not the [Logo](/assets/gjb-logo.svg).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccntrq%2Fgit-jira-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccntrq%2Fgit-jira-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccntrq%2Fgit-jira-branch/lists"}