{"id":13602392,"url":"https://github.com/ilaif/gh-prx","last_synced_at":"2026-02-03T17:19:45.644Z","repository":{"id":65197376,"uuid":"545189842","full_name":"ilaif/gh-prx","owner":"ilaif","description":"A GitHub CLI extension to automate the daily work with branches, commits and pull requests.","archived":false,"fork":false,"pushed_at":"2024-04-22T14:56:00.000Z","size":721,"stargazers_count":37,"open_issues_count":4,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-07T05:39:16.291Z","etag":null,"topics":["automation","gh-extension","git","git-branching","github-config","productivity","pull","pull-request"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ilaif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-10-03T23:57:54.000Z","updated_at":"2024-10-22T14:53:39.000Z","dependencies_parsed_at":"2023-01-10T01:23:44.329Z","dependency_job_id":"be1483f0-2460-477f-83df-51cf82224c56","html_url":"https://github.com/ilaif/gh-prx","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.2272727272727273,"last_synced_commit":"7df297944463b01902bf4748ca9d068846120c7f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilaif%2Fgh-prx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilaif%2Fgh-prx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilaif%2Fgh-prx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilaif%2Fgh-prx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilaif","download_url":"https://codeload.github.com/ilaif/gh-prx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248361624,"owners_count":21090944,"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":["automation","gh-extension","git","git-branching","github-config","productivity","pull","pull-request"],"created_at":"2024-08-01T18:01:22.048Z","updated_at":"2026-02-03T17:19:45.605Z","avatar_url":"https://github.com/ilaif.png","language":"Go","funding_links":[],"categories":["Go","automation"],"sub_categories":[],"readme":"# gh-prx\n\n\u003cimg src=\"https://github.com/ilaif/gh-prx/raw/main/assets/logo.png\" width=\"200\"\u003e\n\nA GitHub (`gh`) CLI extension to automate the daily work with **branches**, **commits** and **pull requests**.\n\n## Usage\n\n[Jump to installation](#installation)\n\n1. Checking out an automatically generated branch from issues:\n\n   ```sh\n   gh prx checkout-new\n   ```\n\n   \u003cimg src=\"https://github.com/ilaif/gh-prx/raw/main/assets/gh-prx-checkout-new.gif\" width=\"700\"\u003e\n\n2. Checking out an automatically generated branch based on an issue id:\n\n   ```sh\n   gh prx checkout-new 1234 # Where 1234 is the issue's key. If not provided, a list of issues will be prompted.\n   ```\n\n   \u003cimg src=\"https://github.com/ilaif/gh-prx/raw/main/assets/gh-prx-checkout-new-issue.gif\" width=\"700\"\u003e\n\n3. Creating a new PR with automatically generated title/body and checklist prompt:\n\n   ```sh\n   gh prx create\n   ```\n\n   \u003cimg src=\"https://github.com/ilaif/gh-prx/raw/main/assets/gh-prx-create.gif\" width=\"700\"\u003e\n\n\u003e Explore further by running `gh prx --help`\n\n## Why?\n\nAs developers, we rely heavily on git and our git provider (in this case, GitHub).\n\nMany of us find the terminal and CLI applications as our main toolkit.\n\n`gh-prx` helps with automating and standardizing how we work with git and GitHub to create a faster and more streamlined workflow for individuals and teams.\n\n## Features\n\n- Automatically creating new branches named based on issues fetched from project management tools\n  - Currently supported: GitHub, Jira, Linear\n- Extended PR creation:\n  - Automatically push branch to origin\n  - Parse branch names by a pattern into a customized PR title and description template\n  - Add labels based on issue types\n  - Filter commits and display them in the PR description\n  - Interactively answer PR checklists before creating the PR\n  - Use AI (🔮) to summarize the PR's changes\n  - All `gh pr create` original flags are extended into the tool\n\n\u003e `gh-prx` is an early-stage project. Got a new feature in mind? Open a pull request or a [feature request](https://github.com/ilaif/gh-prx/issues/new) 🙏\n\n## Configuration\n\nConfiguration is provided from `.github/.gh-prx.yaml` and is advised to be committed to git to maintain standardization across the team.\n\nThe default values for `.gh-prx.yaml` are:\n\n```yaml\nbranch:\n   template: \"{{.Type}}/{{with .Issue}}{{.}}-{{end}}{{.Description}}\" # Branch name template\n   pattern: \"{{.Type}}\\\\/({{.Issue}}-)?{{.Description}}\" # Branch name pattern\n   variable_patterns: # A map of patterns to match for each template variable\n      Type: \"fix|feat|chore|docs|refactor|test|style|build|ci|perf|revert\"\n      Issue: \"([a-zA-Z]+\\-)*[0-9]+\"\n      Author: \"[a-zA-Z0-9]+\"\n      Description: \".*\"\n   token_separators: [\"-\", \"_\"] # Characters used to separate branch name into a human-readable string\n   max_length: 60 # Max characters to allow for branch length without prompting for changing it\npr:\n   title: \"{{.Type}}{{with .Issue}}({{.}}){{end}}: {{humanize .Description}}\" # PR title template\n   ignore_commits_patterns: [\"^wip\"] # Patterns to filter out a commits from the {{.Commits}} variable\n   answer_checklist: true # Whether to prompt the user to answer PR description checklists. Possible answers: yes, no, skip (remove the item)\n   push_to_remote: true # Whether to push the local changes to remote before creating the PR\nissue:\n   provider: github # The provider to use for fetching issue details (supported: github,jira,linear)\n   types: [\"fix\", \"feat\", \"chore\", \"docs\", \"refactor\", \"test\", \"style\", \"build\", \"ci\", \"perf\", \"revert\"] # The issue types to prompt the user when creating a new branch\ncheckout_new:\n   jira:\n      project: \"\" # The Jira project key to use when creating a new branch\n      issue_jql: \"[\u003cjira_project\u003e+AND+]assignee=currentUser()+AND+statusCategory!=Done+ORDER+BY+updated+DESC\" # The Jira JQL to use when fetching issues. \u003cjira_project\u003e is optional and will be replaced with the project key that is configured in the `project` field.\n   github:\n      issue_list_flags: [\"--state\", open\", \"--assignee\", \"@me\"] # The flags to use when fetching issues from GitHub\n   # linear: # Due to Linear's GraphQL API, the issue list is not configurable. The default is: `assignedIssues(orderBy: updatedAt, filter: { state: { type: { neq: \\\"completed\\\" } } })`\npull_request_template_path: \"./pull_request_template.md\" # The pull request template file to use when creating a new PR. Relative to the repository root.\n```\n\n### PR Description (Body)\n\nThe PR description is based on the `pull_request_template_path` variable which defaults to the repo's `.github/pull_request_template.md`. If this file does not exist, a default template is used:\n\n```markdown\n{{with .Issue}}Closes #{{.}}.\n\n{{end}}## Description\n\n{{if .AISummary}}{{.AISummary}}{{ else }}{{humanize .Description}}\n\nChange(s) in this PR:\n{{range $commit := .Commits}}\n\n- {{$commit}}\n  {{- end}}\n  {{- end}}\n\n## PR Checklist\n\n- [ ] Tests are included\n- [ ] Documentation is changed or added\n```\n\n## Templating\n\nThe templates are based on [Go text template](https://pkg.go.dev/text/template).\n\n### Additional template functions\n\n`humanize`:\n\nHumanizes a string by separating it into tokens (words) based on `branch.token_separators`.\n\nExample:\n\nGiven:\n\n- `token_separators: [\"-\"]`\n- `{{.Description}}`: \"my-dashed-string\"\n- Template:\n\n  ```go-template\n  This is \"{{ humanize .Description}}\"\n  ```\n\nResult:\n\n```txt\nThis is \"my dashed string\"\n```\n\n`title`:\n\nCapitalizes the first letter of each word in a string.\n\n`lower`:\n\nLower cases a string.\n\n`upper`:\n\nUpper cases a string.\n\n### Special template variable names\n\n- `{{.Type}}` - Used to interpret GitHub labels to add to the PR and issue type to add the branch name.\n- `{{.Issue}}` - Used as a placeholder for the issue key when creating a new branch.\n- `{{.Description}}` - Used as a placeholder for the issue title when creating a new branch.\n- `{{.Commits}}` - Used as a placeholder in a PR description (body) to iterate over filtered commits.\n- `{{.AISummary}}` - Used as a placeholder in a PR description (body) to add a summary of the PR's changes based on AI.\n\n## AI summary configuration\n\nJust export your OpenAI key as an env var named `OPENAI_API_KEY` and you're good to go.\n\nIf `OPENAI_API_KEY` is not set, the AI summary will not be used.\n\nTo disable the AI summary explicitly, use the `--no-ai-summary` flag.\n\n## Providers\n\nThere are currently 3 providers supported: GitHub, Jira and Linear.\n\n### GitHub\n\nThe GitHub provider is the default provider and is configured simply by running `gh auth login`.\n\n### Jira\n\nTo setup, run `gh prx setup provider jira --endpoint \u003cendpoint\u003e --user \u003cemail\u003e --token \u003ctoken\u003e`.\n\nAlternatively, set the `JIRA_ENDPOINT`, `JIRA_USER` and `JIRA_TOKEN` env vars.\n\n### Linear\n\nTo setup, run `gh prx setup provider linear --api-key \u003capi-key\u003e`.\n\nAlternatively, set the `LINEAR_API_KEY` env var.\n\n## Installation\n\n1. Install the `gh` CLI - see the [installation](https://github.com/cli/cli#installation)\n\n   _Installation requires a minimum version (2.0.0) of the the GitHub CLI that supports extensions._\n\n2. Install this extension:\n\n   ```sh\n   gh extension install ilaif/gh-prx\n   ```\n\n\u003cdetails\u003e\n   \u003csummary\u003e\u003cstrong\u003eInstalling Manually\u003c/strong\u003e\u003c/summary\u003e\n\n\u003e If you want to install this extension **manually**, follow these steps:\n\n1. Clone the repo\n\n   ```bash\n   # git\n   git clone https://github.com/ilaif/gh-prx\n   # GitHub CLI\n   gh repo clone ilaif/gh-prx\n   ```\n\n2. Cd into it\n\n   ```bash\n   cd gh-prx\n   ```\n\n3. Install it locally\n\n   ```bash\n   make install-extension-local\n   ```\n\n\u003c/details\u003e\n\n## Questions, bug reporting and feature requests\n\nYou're more than welcome to [Create a new issue](https://github.com/ilaif/gh-prx/issues/new) or contribute.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.\n\n## License\n\ngh-prx is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license. For more information, please see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filaif%2Fgh-prx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filaif%2Fgh-prx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filaif%2Fgh-prx/lists"}