{"id":23209334,"url":"https://github.com/djuuu/git-mr","last_synced_at":"2025-09-09T13:36:39.471Z","repository":{"id":44450118,"uuid":"270406536","full_name":"Djuuu/git-mr","owner":"Djuuu","description":"Prepares a merge request description, with link to Jira ticket and current branch commit list","archived":false,"fork":false,"pushed_at":"2024-07-19T16:52:59.000Z","size":1214,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-16T23:09:33.783Z","etag":null,"topics":["git","gitlab","jira"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Djuuu.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-06-07T19:14:24.000Z","updated_at":"2024-09-10T10:58:10.000Z","dependencies_parsed_at":"2024-02-25T23:26:28.948Z","dependency_job_id":"db337a6e-8783-4739-b2c7-7cf3d36f1774","html_url":"https://github.com/Djuuu/git-mr","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-mr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-mr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-mr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Djuuu%2Fgit-mr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Djuuu","download_url":"https://codeload.github.com/Djuuu/git-mr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230318608,"owners_count":18207813,"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":["git","gitlab","jira"],"created_at":"2024-12-18T18:16:29.516Z","updated_at":"2025-09-09T13:36:39.460Z","avatar_url":"https://github.com/Djuuu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-mr\n\n[![Tests](https://github.com/Djuuu/git-mr/actions/workflows/tests.yml/badge.svg)](https://github.com/Djuuu/git-mr/actions/workflows/tests.yml)\n[![License](https://img.shields.io/badge/license-Beerware%20%F0%9F%8D%BA-yellow)](https://web.archive.org/web/20160322002352/http://www.cs.trincoll.edu/hfoss/wiki/Chris_Fei:_Beerware_License)\n\nPrepares a merge request description, with link to Jira ticket and current branch commit list.\n\n----------------------------------------------------------------\n\n* [Synopsis](#synopsis)\n* [Installation](#installation)\n    + [Command installation](#command-installation)\n    + [Configuration](#configuration)\n* [Commands](#commands)\n    + [`git mr`](#git-mr-2)\n    + [`git mr open`](#git-mr-open)\n    + [`git mr status`](#git-mr-status)\n    + [`git mr update`](#git-mr-update)\n    + [`git mr menu`](#git-mr-menu)\n    + [`git mr ip|cr|qa|ok`](#git-mr-ipcrqaok)\n    + [`git mr undraft`](#git-mr-undraft)\n    + [`git mr merge`](#git-mr-merge)\n    + [`git mr hook`](#git-mr-hook)\n* [Plumbing commands](#plumbing-commands)\n  + [`git mr base`](#git-mr-base)\n  + [`git mr code`](#git-mr-code)\n* [Hooks](#hooks)\n  + [`prepare-commit-msg`](#prepare-commit-msg)\n\n----------------------------------------------------------------\n\n## Synopsis\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e          \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003eopen\u003c/b\u003e    \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003estatus\u003c/b\u003e  \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003eupdate\u003c/b\u003e  \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003emerge\u003c/b\u003e   \u003ci\u003e[BRANCH]\u003c/i\u003e\n\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003emenu\u003c/b\u003e                     \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003emenu\u003c/b\u003e \u003ci\u003eupdate [--current]\u003c/i\u003e  \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003emenu\u003c/b\u003e \u003ci\u003eedit\u003c/i\u003e                \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003emenu\u003c/b\u003e \u003ci\u003estatus\u003c/i\u003e              \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e\n\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003e(ip|cr|qa|ok)\u003c/b\u003e  \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003ci\u003e[OPTIONS]\u003c/i\u003e  \u003cb\u003eundraft\u003c/b\u003e        \u003ci\u003e[BRANCH]\u003c/i\u003e\n\n\u003cb\u003egit mr\u003c/b\u003e  \u003cb\u003ebase\u003c/b\u003e  \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003cb\u003egit mr\u003c/b\u003e  \u003cb\u003ecode\u003c/b\u003e  \u003ci\u003e[BRANCH]\u003c/i\u003e\n\n\u003cb\u003egit mr\u003c/b\u003e  \u003cb\u003ehook\u003c/b\u003e\n\u003c/pre\u003e\n\n### Arguments\n\n* `BRANCH`  \n  Merge request source branch.  \n  (Defaults to current branch.)\n\n* `SEARCH_TERM`  \n  Term searched in merge requests titles to build menu.  \n  (Defaults to Jira issue code guessed from branch name.)\n\n### Options\n\n* `-c`, `--code` `ISSUE_CODE`  \n  Force issue code.\n* `-t`, `--target` `TARGET_BRANCH`  \n  Force target branch.\n* `-e`, `--extended`  \n  Use full commit messages in description (\"extended\", for `git mr [open|update]`).  \n  You can also set `GIT_MR_EXTENDED=1` in your environment variables to always use extended commit descriptions.\n* `-s`, `--short`  \n  Use short commit messages in description.  \n  Useful when extended mode is enabled in configuration or environment.\n* `--no-color`  \n  Disable terminal colors.\n* `--no-links`  \n  Disable terminal hyperlinks and show merge request URL in `mr status` and `mr menu status`.\n* `--no-commits`  \n  Do not display the list of commits in the merge request description.\n* `-y`, `--yes`  \n  Bypass confirmation prompts (always answer \"yes\").\n* `-v`, `--verbose`  \n  Verbose output (displays called API URLs).\n* `-h`  \n  Show help page.\n\n#### Command-specific options\n\n* `git mr update`\n  * `-n`, `--new-section` `[NEW_SECTION_TITLE]`  \n    Add new section in description for new commits.\n  * `-r`, `--replace-commits`  \n    Fully replace commit list in description with current commits.\n\n* `git mr menu update`\n  * `--current`  \n    Update only current project/branch merge request.\n\n* `git mr merge`\n  * `-f`, `--force`  \n    Force merge even if there are unresolved threads.\n\n## Installation\n\n### Command installation\n\n#### Dependencies\n\n* `bash`, `git` and usual command-line utilities: `grep`, `sed`, `curl`, `head`, `tail`, `tr`.\n* [**`jq`**](https://stedolan.github.io/jq/) is required and needs to be in PATH.\n\n**Note for macOS users:**  \n\u003e macOS usually comes with a pretty outdated version of Bash (3.x) and the BSD versions of `grep` and `sed`.  \n\u003e You will need to install a more recent versions of bash (\u003e=4.x) and the GNU versions of `sed` and `grep`.  \n\u003e These are available on Homebrew:\n\u003e ```shell\n\u003e brew install bash gnu-sed grep\n\u003e ```\n\u003e git-mr detects these versions, so no additional path adjustments should be necessary.\n\n#### git-mr\n\n* Add the `git-mr` directory to your `PATH`  \n  in one of your shell startup scripts:\n  ```bash\n  PATH=\"${PATH}:/path/to/git-mr\"\n  ```\n\n_OR_ \n\n* Define it as a Git alias:  \n  run:\n  ```bash\n  git config --global alias.mr '!bash /path/to/git-mr/git-mr'\n  ```\n  or edit your `~/.gitconfig` directly:\n  ```\n  [alias]\n  \tmr = \"!bash /path/to/git-mr/git-mr\"\n  ```\n\n#### Completion\n\nCompletion functions for Bash and Zsh are available:\n\n* **Bash**  \n  Source `git-mr-completion.bash` in one of your shell startup scripts (`.bashrc` / `.bash_profile`):\n  ```bash\n  . \"/path/to/git-mr/git-mr-completion.bash\"\n  ```\n\n* **Zsh**   \n  Add the `completion` directory to your `fpath` (in your `.zshrc`, before any call to `compinit` or `oh-my-zsh.sh`)\n  ```zsh\n  fpath=(\"/path/to/git-mr/completion\" $fpath)\n  ```\n  You may have to force a rebuild of `zcompdump` by running:\n  ```zsh\n  rm -f ~/.zcompdump; compinit\n  ```\n\n### Configuration\n\nGit-mr can either be configured through [git-config](https://git-scm.com/docs/git-config) or environment variables.\n\nWhen using Git configuration, project-specific overrides can be set by omitting the `--global` option:\n```bash\n# Global configuration stored in your ~/.gitconfig\ngit config --global mr.global-option \"global-value\"\n\n# Local configuration stored in current project's .git/config\ngit config mr.local-option \"local-value\"\n```\n\nEnvironment variables take precedence over Git configuration.\n\n#### Git configuration reference\n\n```bash\n# Required configuration -------------------------------------------------------\n\ngit config --global mr.jira-instance \"mycompany.atlassian.net\"\ngit config --global mr.jira-user     \"user.name@mycompany.com\"\ngit config --global mr.jira-token    \"abcdefghijklmnopqrstuvwx\"\n\ngit config --global mr.jira-code-pattern \"[A-Z]{2,3}-[0-9]+\"\n\ngit config --global mr.gitlab-domain \"myapp.gitlab.com\"\ngit config --global mr.gitlab-token  \"Zyxwvutsrqponmlkjihg\"\n\n# Optional configuration -------------------------------------------------------\n\n# Default labels for new merge requests\ngit config --global mr.gitlab-default-labels \"Review,My Team\"\n\n# Check \"Delete source branch\" by default (defaults to 1)\n# git config --global mr.gitlab-remove-source-branch-on-merge 1\n\n# Gitlab status labels (comma-separated, without spaces in between)\ngit config --global mr.gitlab-ip-labels \"WIP\"\ngit config --global mr.gitlab-cr-labels \"Review\"\ngit config --global mr.gitlab-qa-labels \"Testing\"\ngit config --global mr.gitlab-ok-labels \"Accepted\"\n\n# Jira status - transition IDs\ngit config --global mr.jira-ip-id \"xx\"\ngit config --global mr.jira-cr-id \"xx\"\ngit config --global mr.jira-qa-id \"xx\"\ngit config --global mr.jira-ok-id \"xx\"\n\n# Always use extended commit messages\n# git config --global mr.git-mr-extended 1\n\n# Required upvote count to turn indicator green in `mr status` (defaults to 2)\n# git config --global mr.git-mr-required-upvotes 2\n\n# Limit merge request search for menu to given group (empty by default, useful on gitlab.com)\n# git config --global mr.gitlab-mr-limit-group \"my-company\"\n\n# Limit project name search to the ones you are a member of (defaults to 1, useful on gitlab.com)\n# git config --global mr.gitlab-projects-limit-member 1\n\n# Network timeout (in seconds, defaults to 10)\n# git config --global mr.git-mr-timeout 10\n\n# Auto-fetch periodically (defaults to false)\n# git config --global mr.git-mr-autofetch true\n# Auto-fetch interval (in minutes)\n# git config --global mr.git-mr-autofetch-interval 5\n```\n\n**Tip:**  \nIf you need distinct configuration \"sets\" but don't want to repeat the same values over and over \nin multiple projects, you might want to use [Git config includes](https://git-scm.com/docs/git-config#_includes).\n\n#### Environment variables reference\n\n```bash\n# Required configuration -------------------------------------------------------\n\nexport JIRA_INSTANCE=\"mycompany.atlassian.net\"\nexport JIRA_USER=\"user.name@mycompany.com\"\nexport JIRA_TOKEN=\"abcdefghijklmnopqrstuvwx\"\n\nexport JIRA_CODE_PATTERN=\"[A-Z]{2,3}-[0-9]+\"\n\nexport GITLAB_DOMAIN=\"myapp.gitlab.com\"\nexport GITLAB_TOKEN=\"Zyxwvutsrqponmlkjihg\"\n\n# Optional configuration -------------------------------------------------------\n\n# Default labels for new merge requests\nexport GITLAB_DEFAULT_LABELS=\"Review,My Team\"\n\n# Check \"Delete source branch\" by default (defaults to 1)\n#export GITLAB_REMOVE_SOURCE_BRANCH_ON_MERGE=1\n\n# Gitlab status labels (comma-separated, without spaces in between)\nexport GITLAB_IP_LABELS=\"WIP\"\nexport GITLAB_CR_LABELS=\"Review\"\nexport GITLAB_QA_LABELS=\"Testing\"\nexport GITLAB_OK_LABELS=\"Accepted\"\n\n# Jira status - transition IDs\nexport JIRA_IP_ID=\"xx\"\nexport JIRA_CR_ID=\"xx\"\nexport JIRA_QA_ID=\"xx\"\nexport JIRA_OK_ID=\"xx\"\n\n# Always use extended commit messages\n# export GIT_MR_EXTENDED=1\n\n# Required upvote count to turn indicator green in `mr status` (defaults to 2)\n#export GIT_MR_REQUIRED_UPVOTES=2\n\n# Limit merge request search for menu to given group (empty by default, useful on gitlab.com)\n#GITLAB_MR_LIMIT_GROUP=\"my-company\"\n\n# Limit project name search to the ones you are a member of (defaults to 1, useful on gitlab.com)\n#GITLAB_PROJECTS_LIMIT_MEMBER=1\n\n# Network timeout (in seconds, defaults to 10)\n#export GIT_MR_TIMEOUT=10\n\n# Auto-fetch periodically (defaults to false)\n#GIT_MR_AUTOFETCH=true\n# Auto-fetch interval (in minutes)\n#GIT_MR_AUTOFETCH_INTERVAL=5\n```\n\nEnvironment-only configuration:\n```bash\n## What to show as merge request title in `git mr menu status`. Available values:\n## - \"both\":   Merge request title and branch (default)\n## - \"title\":  Merge request title only\n## - \"branch\": Merge request source branch only\n#GIT_MR_MENU_STATUS_SHOW=both\n\n## Separator between merge request title and branch when GIT_MR_MENU_STATUS_SHOW=both \n#GIT_MR_MENU_STATUS_TITLE_BRANCH_SEPARATOR=\"  \"    # default\n#GIT_MR_MENU_STATUS_TITLE_BRANCH_SEPARATOR=\"\\n   \" # send to the next line\n```\n\n#### Jira \u0026 Gitlab tokens\n\nTo create a Jira API Token, go to:\n* https://id.atlassian.com/manage-profile/security/api-tokens  \n  (Account Settings -\u003e Security -\u003e API Token -\u003e Create and manage API tokens)\n\nTo create a Gitlab API Token, go to:\n* https://myapp.gitlab.com/-/user_settings/personal_access_tokens  \n  (Edit profile -\u003e Access Tokens)  \n  Required scope : `api`\n\n## Commands\n\n### `git mr`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nThis will print a merge request description, with a link to Jira ticket and current branch commit list.\n\n* Issue code can be guessed from the branch name according to `JIRA_CODE_PATTERN`.  \n  It can also be forced with the `-c|--code` option.\n* Target branch is determined by going up the commit history and finding the first one attached to another local branch.  \n  It can also be forced with the `-t|--target` option.\n\nIf a merge request based on the current branch is found on Gitlab, its URL will be provided, along with current votes, open and resolved threads and mergeable status.\nOtherwise, a link to create a new merge request will be provided. \n\nDefault labels and \"Delete source branch\" status can be configured with the `GITLAB_DEFAULT_LABELS` and `GITLAB_REMOVE_SOURCE_BRANCH_ON_MERGE` environment variables.\n\n![git mr](doc/git-mr.png)\n\n![git mr -e](doc/git-mr-e.png)\n\n----------------------------------------------------------------\n\n### `git mr open`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003eo|op|open\u003c/b\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nSimilar to `git mr`, but will open browser directly.\n\n----------------------------------------------------------------\n\n### `git mr status`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003es|st|status\u003c/b\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nDisplays a quick summary of the merge request, with useful indicators (tags, target branch, votes, open threads, draft status, ...)\n\n![git mr status](doc/git-mr-status.png)\n\n----------------------------------------------------------------\n\n### `git mr update`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003eu|up|update\u003c/b\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nThis will:\n* fetch and display the current merge request description from Gitlab.\n* compare the commit lists and update the SHA-1 references in the description\n\nIf some commits were changed (after a rebase) or added, you will be prompted if you want to post the updated description to Gitlab.\n\nYou can also update the source branch if it is different from the current one.\n\n![git mr update](doc/git-mr-update.png)\n\n#### Note on commit links\n\nThe initial merge request description lists commit SHA-1 and message in a simple format.\n\nWhen Gitlab recognizes a partial Git SHA-1 in a description, it will automatically create a link to the commit,\nbut this link has no reference to the current merge request:\n\u003e `https://myapp.gitlab.com/my-project/-/commit/0a1b2c3d4e5f`\n\nIf a comment is created from this commit page, it might appear in the merge request at first, \nbut **it will disappear as soon as the branch is rebased**.\n\nOnce the merge request exists, `git mr update` will convert SHA-1 references to **links to the commit in the merge request diff view**:\n\u003e `https://myapp.gitlab.com/my-project/-/merge_requests/123/diffs?commit_id=0a1b2c3d4e5f`\n\nThis view allows navigating through the merge request commits, and comments left on this page will remain attached to the merge request.\n\n![git mr update links](doc/git-mr-update-links.png)\n\n----------------------------------------------------------------\n\n### `git mr menu`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003emenu\u003c/b\u003e                       \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e \n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003emenu\u003c/b\u003e \u003ci\u003eup|update [--current]\u003c/i\u003e \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e \n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003emenu\u003c/b\u003e \u003ci\u003eed|edit\u003c/i\u003e               \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e \n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003emenu\u003c/b\u003e \u003ci\u003est|status\u003c/i\u003e             \u003ci\u003e[SEARCH_TERM]\u003c/i\u003e \n\u003c/pre\u003e\n\nSearches for all (non-closed) merge requests with the current issue code in the title, and generates a menu.\n\n* `git mr menu`  \n  Prints the markdown menu.\n\n  ![git mr menu](doc/git-mr-menu.png)\n\n* `git mr menu up|update`  \n  Inserts or updates menu in all related merge request descriptions (prompts for confirmation).\n\n  ![git mr menu update](doc/git-mr-menu-update.png)\n\n* `git mr menu up|update --current`  \n  Inserts or updates menu in current merge request description only (prompts for confirmation).\n\n* `git mr menu ed|edit`  \n  Opens menu in editor for tweaking before updating related merge request descriptions.  \n  Uses default editor, guessed through `VISUAL` or `EDITOR` environment variables.\n\n  ![git mr menu edit](doc/git-mr-menu-edit-0.png)\n\n  ![git mr menu edit](doc/git-mr-menu-edit-1.png)\n\n  ![git mr menu edit](doc/git-mr-menu-edit-2.png)\n\n* `git mr menu st|status`  \n  Prints menu and status indicators for every related merge request.\n\n  ![git mr menu status](doc/git-mr-menu-status.png)\n\n----------------------------------------------------------------\n\n### `git mr ip|cr|qa|ok`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003eip|cr|qa|ok\u003c/b\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nThis will:\n* Set Gitlab labels according to:\n  - `GITLAB_IP_LABELS`\n  - `GITLAB_CR_LABELS`\n  - `GITLAB_QA_LABELS`\n  - `GITLAB_OK_LABELS`\n* transition Jira ticket using ID defined in:\n  - `JIRA_IP_ID`\n  - `JIRA_CR_ID`\n  - `JIRA_QA_ID`\n  - `JIRA_OK_ID`\n\n#### `git mr ip` _(\"in progress\")_\n* removes Gitlab labels defined in `GITLAB_CR_LABELS`, `GITLAB_QA_LABELS` and `GITLAB_OK_LABELS`\n* adds Gitlab labels defined in `GITLAB_IP_LABELS`\n* sets Gitlab draft status\n* transitions Jira ticket using `JIRA_IP_ID`\n\n#### `git mr cr` _(\"code review\")_\n* removes Gitlab labels defined in `GITLAB_IP_LABELS`, `GITLAB_QA_LABELS`, and `GITLAB_OK_LABELS`\n* adds Gitlab labels defined in `GITLAB_CR_LABELS`\n* transitions Jira ticket using `JIRA_CR_ID`\n\n#### `git mr qa` _(\"quality assurance\")_\n* removes Gitlab labels defined in `GITLAB_IP_LABELS`, `GITLAB_CR_LABELS`, and `GITLAB_OK_LABELS`\n* adds Gitlab labels defined in `GITLAB_QA_LABELS`\n* transitions Jira ticket using `JIRA_QA_ID`\n\n#### `git mr ok` _(\"accepted\")_\n* removes Gitlab labels defined in `GITLAB_IP_LABELS`, `GITLAB_CR_LABELS`, and `GITLAB_QA_LABELS`\n* adds Gitlab labels defined in `GITLAB_OK_LABELS`\n* removes Gitlab draft status\n* transitions Jira ticket using `JIRA_OK_ID`\n\n----------------------------------------------------------------\n\n### `git mr undraft`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003eundraft\u003c/b\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nThis will resolve the Gitlab _Draft_ (_Work in Progress_) status.\n\n----------------------------------------------------------------\n\n### `git mr merge`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003ci\u003e[OPTION...]\u003c/i\u003e \u003cb\u003em|mg|merge\u003c/b\u003e \u003ci\u003e[BRANCH]\u003c/i\u003e\n\u003c/pre\u003e\n\nThis will:\n* check merge status\n* check open threads\n* check draft status\n\nand if applicable, will prompt you to:\n* resolve draft status\n* trigger the merge\n* checkout local target branch, update it and delete local merged branch\n\n![git mr merge](doc/git-mr-merge.png)\n\n----------------------------------------------------------------\n\n### `git mr hook`\n\n\u003cpre\u003e\n\u003cb\u003egit mr\u003c/b\u003e \u003cb\u003ehook\u003c/b\u003e\n\u003c/pre\u003e\n\nAdds the `prepare-commit-msg` Git hook to your current repository.\n\n----------------------------------------------------------------\n\n## Plumbing commands\n\nThese \"plumbing\" commands can be useful in other scripts or git aliases.\n\n### `git mr base`\n\nOutputs guessed base branch.\n\n----------------------------------------------------------------\n\n### `git mr code`\n\nOutputs guessed issue code.\n\n----------------------------------------------------------------\n\n## Hooks\n\nThe following hooks are provided for convenience:\n\n### `prepare-commit-msg`\n\nEnsures your commit messages are prefixed with the code of related issue.\n\n![git mr prepare-commit-msg hook](doc/git-mr-prepare-commit-msg.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjuuu%2Fgit-mr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjuuu%2Fgit-mr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjuuu%2Fgit-mr/lists"}