{"id":13702860,"url":"https://github.com/chmouel/gh-workon","last_synced_at":"2025-04-23T16:03:57.742Z","repository":{"id":66897113,"uuid":"563219393","full_name":"chmouel/gh-workon","owner":"chmouel","description":"A gh extension to create a branch out of issue","archived":false,"fork":false,"pushed_at":"2025-02-14T15:29:20.000Z","size":45,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T16:03:48.776Z","etag":null,"topics":["command-line","gh-extension","git","github","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chmouel.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,"zenodo":null}},"created_at":"2022-11-08T06:39:07.000Z","updated_at":"2025-02-14T15:29:25.000Z","dependencies_parsed_at":"2025-04-20T06:46:37.592Z","dependency_job_id":null,"html_url":"https://github.com/chmouel/gh-workon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fgh-workon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fgh-workon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fgh-workon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fgh-workon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chmouel","download_url":"https://codeload.github.com/chmouel/gh-workon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468273,"owners_count":21435452,"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":["command-line","gh-extension","git","github","shell"],"created_at":"2024-08-02T21:00:44.628Z","updated_at":"2025-04-23T16:03:57.714Z","avatar_url":"https://github.com/chmouel.png","language":"Shell","funding_links":[],"categories":["Tool"],"sub_categories":[],"readme":"# gh-workon\n\nCreate a git branch from a GitHub issue and assign it to yourself.\n\n## Demo\n\n#### Simple\nhttps://user-images.githubusercontent.com/98980/200496618-bbd935dd-e34e-4e06-936b-d35b212a6e83.mp4\n\n### Using worktree and selecting the branch from where to start\n\nhttps://github.com/chmouel/gh-workon/assets/98980/d3fd47c2-5eab-41d1-b933-c985161a6506\n\n## Installation\n\n```shell\ngh extension install chmouel/gh-workon\n```\n\n### Requirements\n\n- [GH](https://github.com/cli/cli)\n- GNU sed\n- GNU awk\n- [FZF](https://github.com/junegunn/fzf)\n\n## Usage\n\ngh workon extension let you choose an issue from a list of issues with FZF and\nautomatically create a branch out of it and assign the issue to yourself.\n\nIf you specify a query as the first argument, it will be used to filter the list of title matching this query.\n\n```shell\ngh workon \"crash\"\n```\n\nif you add a `-c` it will generate a commit message with the issue title and the issue number. You can automate the creation of the commit this like this :\n\n```shell\ngit commit -m \"$(gh workon -c)\" --edit\n```\n\nThe `-N` flag will not create any branch and just print the one that would have been created.\n\nWhen you have the `-F` it will use the issue number directly and not try to\nchoose any via fzf (useful if you have a old issue reaching the gh issue list\nlimit)\n\nYou can specify the flag `-p` to prompt for a branch (with fzf) from where the new branch or worktree will start from.\n\nYou can specify a -w with a basedir as argument to have a worktree created in the basedir (with the issue name appended) and a new branch.\n\n## Git hooks\n\nIf you install the script [prepare-commit-msg](./prepare-commit-msg) into your\n`.git/hooks` directory (make sure it is set as executable). It will automatically\ndetect if you are in branch named `issue-NUMBER` and prepare a commit message out\nof the issue title for you.\n\nIt tries to do the right thing and only add the `Fixes #ISSUE_NUMBER` if there is already a commit message but that `Fixes` keywork is not there.\n\n## TODO\n\n- Support glab\n- Create worktree instead of branch\n- Convert it to go/rust/python to avoid shell quoting issues.\n\n## BUGS\n\n- may be buggy with some characters due of shell quoting issues.\n\n## Copyright\n\n[Apache-2.0](./LICENSE)\n\n## Authors\n\nChmouel Boudjnah\n\n- Fediverse - \u003c[@chmouel@chmouel.com](https://fosstodon.org/@chmouel)\u003e\n- Twitter - \u003c[@chmouel](https://twitter.com/chmouel)\u003e\n- Blog  - \u003c[https://blog.chmouel.com](https://blog.chmouel.com)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmouel%2Fgh-workon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchmouel%2Fgh-workon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmouel%2Fgh-workon/lists"}