{"id":13529831,"url":"https://github.com/robvanderleek/create-issue-branch","last_synced_at":"2025-05-15T09:08:25.635Z","repository":{"id":37579910,"uuid":"197534757","full_name":"robvanderleek/create-issue-branch","owner":"robvanderleek","description":"Boost your GitHub workflow 🚀","archived":false,"fork":false,"pushed_at":"2025-05-01T02:21:02.000Z","size":66613,"stargazers_count":337,"open_issues_count":11,"forks_count":46,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-06T17:52:38.638Z","etag":null,"topics":["github-action","github-app","issue-label","issues","probot"],"latest_commit_sha":null,"homepage":"https://github.com/apps/create-issue-branch","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robvanderleek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"robvanderleek"}},"created_at":"2019-07-18T07:24:55.000Z","updated_at":"2025-04-24T06:30:51.000Z","dependencies_parsed_at":"2023-12-21T09:31:06.060Z","dependency_job_id":"7501845e-47f0-413c-ba05-b568a4ffd1e3","html_url":"https://github.com/robvanderleek/create-issue-branch","commit_stats":{"total_commits":2451,"total_committers":15,"mean_commits":163.4,"dds":0.292125662994696,"last_synced_commit":"b82c47ed14db0b7ee2f6a501bf566813440592a7"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fcreate-issue-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fcreate-issue-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fcreate-issue-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fcreate-issue-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robvanderleek","download_url":"https://codeload.github.com/robvanderleek/create-issue-branch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310520,"owners_count":22049470,"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":["github-action","github-app","issue-label","issues","probot"],"created_at":"2024-08-01T07:00:39.782Z","updated_at":"2025-05-15T09:08:20.620Z","avatar_url":"https://github.com/robvanderleek.png","language":"JavaScript","funding_links":["https://github.com/sponsors/robvanderleek"],"categories":["Community Resources","JavaScript"],"sub_categories":["GitHub Tools and Management"],"readme":"# Create Issue Branch\n\n\u003cdiv align=\"center\"\u003e\n\n![Logo](public/logo.png)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n*Boost your GitHub workflow 🚀*\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build Status](https://github.com/robvanderleek/create-issue-branch/workflows/main/badge.svg)](https://github.com/robvanderleek/create-issue-branch/actions)\n[![CodeLimit](https://github.com/robvanderleek/create-issue-branch/blob/_codelimit_reports/main/badge.svg)](https://github.com/robvanderleek/create-issue-branch/blob/_codelimit_reports/main/codelimit.md)\n[![codecov](https://codecov.io/gh/robvanderleek/create-issue-branch/branch/main/graph/badge.svg?token=WBKIPs2WEc)](https://codecov.io/gh/robvanderleek/create-issue-branch)\n[![Dependabot](https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot)](https://dependabot.com/)\n[![Sentry](https://img.shields.io/badge/sentry-enabled-green)](https://sentry.io)\n![Vercel](https://vercelbadge.vercel.app/api/robvanderleek/create-issue-branch)\n[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)\n\n\n\u003c/div\u003e\n\nA GitHub App/Action that boosts your GitHub workflow by automating the creation\nof issue branches (and many more things!)\n\nUnique features offered by this app that are not available on GitHub:\n\n- [Configure branch name\n  format](https://github.com/robvanderleek/create-issue-branch#branch-names)\n- [Configure default source\n  branch](https://github.com/robvanderleek/create-issue-branch#default-source-branch)\n- [Configure source branch based on\n  label](https://github.com/robvanderleek/create-issue-branch#source-branch-based-on-issue-label)\n- [Automatically open a (draft) Pull\n  Request](https://github.com/robvanderleek/create-issue-branch#automatically-open-a-pull-request)\n- [Copy over attributes (such as labels and milestones) from the issue to the\n  (draft)\n  PR](https://github.com/robvanderleek/create-issue-branch#copy-attributes-from-issue)\n- [Configure PR target branch based on issue\n  label](https://github.com/robvanderleek/create-issue-branch#pull-request-target-branch-based-on-issue-label)\n- [Feature requests are always\n  welcome!](https://github.com/robvanderleek/create-issue-branch#feedback-suggestions-and-bug-reports)\n\n# Table of Contents\n\n* [Installation](#installation)\n* [Usage](#usage)\n* [Configuration](#configuration)\n* [Development](#development)\n* [Feedback, suggestions and bug reports](#feedback-suggestions-and-bug-reports)\n* [Contributing](#contributing)\n* [License](#license)\n\n# Installation\n\nThere are two options to run this app as part of your development workflow:\n\n1. [Install](https://github.com/marketplace/create-issue-branch) it as an *app* for your organization/account/repository\n2. Run it as an *action* in your GitHub action YAML configuration\n\nOption 1 is easiest if you're developing on GitHub.com, option 2 gives you full\ncontrol how and when the app runs in your development workflow.\n\nThe App is free to use for personal, and public organization repositories. There\nis [a paid plan on the GitHub Marketplace](https://github.com/marketplace/create-issue-branch/) if you want to use it\nfor private organization repositories.\n\n## Option 1. Install the GitHub App\n\nYou can install the app for your organization/account/repository from [*the GitHub\nMarketplace*](https://github.com/marketplace/create-issue-branch)\n\n## Option 2. Configure GitHub Action\n\nAdd this to your workflow YAML configuration:\n\n```yaml\non:\n  # The issue.opened event below is only needed for the \"immediate\" mode.\n  # The issue.assigned event below is only needed for the default (\"auto\") mode.\n  issues:\n    types: [ opened, assigned ]\n  # The issue_comment.created event below is only needed for the ChatOps mode.\n  issue_comment:\n    types: [ created ]\n  # The pull_request events below are only needed for pull-request related features.\n  pull_request:\n    types: [ opened, closed ]\n\njobs:\n  create_issue_branch_job:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Create Issue Branch\n        uses: robvanderleek/create-issue-branch@main\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n*The latest GitHub Marketplace release is not always up-to-date (due\nto [this](https://github.community/t/automatically-publish-action-to-marketplace-on-release/17978)). To have access to\nall features please use version `@main`*\n\n### GitHub Action output variable\n\nThe GitHub Action has one output variable: `branchName`, which contains the\nname of the branch that was created, or already exists in the repository. You\ncan use this output in downstream actions. For a trivial example see [this\nworkflow](https://github.com/robvanderleek/robvanderleek.github.io/blob/2af5f90d94d81e942382892a6b6149467184b38b/.github/workflows/issue-branch.yml).\n\n## Uninstall\n\nUninstall the App by navigating to: `Settings \u003e Applications \u003e Installed GitHub\nApps \u003e Create Issue Branch \u003e Configure`.  At the bottom of that page there's a\nbutton to uninstall the Create Issue Branch app.\n\nYou can also use [this link](https://github.com/settings/installations/7740930)\nto navigate to the configuration page mentioned above.\n\n\n# Usage\n\nThis app can support your development workflow in three ways (modes): auto,\nimmediate, and chatops.\n\nIn \"auto\" mode the typical development workflow is:\n\n1. An issue is created, for example: Issue 15: Fix nasty bug!\n\n*some time may pass*\n\n2. The issue is assigned\n3. When the issue is assigned this app will create a new issue branch\n   (for the example issue this branch will be called `issue-15-Fix_nasty_bug`)\n\nIn \"immediate\" mode the typical development workflow is:\n\n1. An issue is created, for example: Issue 15: Fix nasty bug!\n2. Immediately after creation, this app will create a new issue branch (for the\n   example issue this branch will be called `issue-15-Fix_nasty_bug`)\n\nIn \"chatops\" mode the typical development workflow is:\n\n1. An issue is created, for example: Issue 15: Fix nasty bug!\n\n*some time may pass*\n\n2. A developer that wants to work on this issue gives the ChatOps command\n   `/cib` as a comment on the issue\n3. This app will create a new issue branch (for the example issue this branch\n   will be called `issue-15-Fix_nasty_bug`) By default the app notifies\n   creation is completed with a comment on the issue.\n\n## Advanced usage with other Apps \u0026 Actions\n\nGitHub Apps \u0026 Actions allow you to define custom and advanced automated\nworkflows. Examples of Apps \u0026 Actions that can be used alongside this app to\ncompose tailored issue workflows are:\n\n- [project-bot](https://github.com/philschatz/project-bot): App for project automation\n- [github-actions-automate-projects](https://github.com/takanabe/github-actions-automate-projects): Action for project\n  automation\n- [auto-card-labeler](https://github.com/technote-space/auto-card-labeler): Automatically label issues/PRs\n\nTo get inspired of what is possible with Actions workflows,\nsee [this configuration](https://github.com/takeshape/.github/blob/4ecfb2fb54164934ad70822c709ab1917541114d/.github/workflows/_pm_issues.yml)\n.\n\n_Remember to always pick the simplest issue workflow that fits your project_.\n\n\n# Configuration\n\nThis app does not require a configuration. However, if you want to override the\ndefault behaviour you can do so by placing a YAML file in your repository at\nthe location: `.github/issue-branch.yml` with the overrides.\n\nIf the app has a problem with your configuration YAML (e.g.: invalid content)\nit will create an issue with the title \" Error in Create Issue Branch app\nconfiguration\" in the repo. Subsequent runs with an invalid configuration will\nnot create new issues, only one stays open.\n\n## Organization/User wide configuration\n\nOrganization/user wide configuration prevents a configuration in every\nindividual repo and is supported by putting the YAML file\n`.github/issue-branch.yml` in a repository called `.github`. So, if your\norganization/username is `acme`, the full path becomes:\n`https://github.com/acme/.github/blob/main/.github/issue-branch.yml`.\n\nRemember to give the GitHub App access to the `.github` repository, otherwise\nit can't load the organization/user wide configuration.\n\nRepository configuration files override the organization/user wide\nconfiguration file.\n\n## Mode: auto, immediate, or chatops\n\nThe default mode is \"auto\", meaning a new issue branch is created after an\nissue is assigned.\n\nYou can change the mode to \"immediate\", meaning a new issue branch is created\nimmediately after creating an issue, by putting the following line in your\n`issue-branch.yml`:\n\n```yaml\nmode: immediate\n```\n\nYou can change the mode to \"chatops\", meaning a new issue branch is created\nafter commenting on an issue with `/create-issue-branch` or `/cib`, by putting\nthe following line in your `issue-branch.yml`:\n\n```yaml\nmode: chatops\n```\n\n## Silent or chatty\n\nBy default the app comments on the issue after creating a branch.\n\nYou can change this default behaviour, and make the app silent, by putting the following line in\nyour `issue-branch.yml`:\n\n```yaml\nsilent: true\n```\n\n## Branch names\n\nBranch names are generated from the issue, there are 3 built-in flavours or it can be customized.\n\nThe 3 built-in flavours are:\n\n1. `tiny` =\u003e an `i` followed by the issue number, for example: `i15`\n2. `short` =\u003e the word `issue` followed by the issue number, for example:\n   `issue-15`\n3. `full` =\u003e the word issue followed by the issue number followed by the issue title, for\n   example: `issue-15-Fix_nasty_bug`\n\nThe default is `full`, other types can be configured in the YAML like this:\n\n```yaml\nbranchName: tiny\n```\n\nor\n\n```yaml\nbranchName: short\n```\n\n### Substitution placeholders\n\nTo customize branch names you can give `branchName` a string value where `${...}`\nplaceholders are substituted with fields from the GitHub issue or environment variables.\n\nFor example, if you would like to have your branch names contain only the issue number and title (similar to the GitLab\nbranch naming convention), configure it like this:\n\n```yaml\nbranchName: '${issue.number}-${issue.title}'\n```\n\nSee\n[test/fixtures/issues.assigned.json](tests/test-fixtures/issues.assigned.json) for all possible placeholder names.\n\nSubstitution placeholders can also refer to environment variables in GitHub Actions. Environment variable names need to\nbe prefixed with a `%` character to distinguish them from GitHub issue fields.\n\nFor example, if the environment variable `SOME_VAR` is defined outside the action it can be used in a branch name like\nthis:\n\n```yaml\nbranchName: '${issue.number}-${%SOME_VAR}-${issue.title}'\n```\n\n### Substitution value slicing\n\nSubstitution values can be \"sliced\" with the slice operator: `[start, end]`. This operator behaves exactly like the\n[JavaScript String `slice()` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice)\n.\n\nFor example, put this in your configuration YAML to limit issue titles to 64 characters:\n\n```yaml\nbranchName: '${issue.number}-${issue.title[0,64]}'\n```\n\n### Lowercase and uppercase substitutions\n\nSubstitutions for `${...}` placeholders can be lowercased by putting a `,` before the closing curly. Likewise,\nsubstitutions can be uppercased by putting a `^` before the closing curly.\n\nFor example, issue titles can be lowercased in branch names like this:\n\n```yaml\nbranchName: '${issue.number}-${issue.title,}'\n```\n\nor if you want the complete title in uppercase:\n\n```yaml\nbranchName: '${issue.number}-${issue.title^}'\n```\n\n### Left padding with zeros\n\nSubstitutions can be left padded with zeros using the `%n` operator, where `n` is the minimum number of characters \nof the substitution result.\n\nFor example, issue numbers can be left padded with zeros like this:\n\n```yaml\nbranchName: 'issue-${issue.number%4}'\n```\n\nIn the example above, if the issue number is 123, the resulting branch name will be `issue-0123`.\n\n### Configure replacement character and replace arbitrary characters\n\nCharacters that are not allowed in Git branch names are replaced by default with an underscore (`_`) character. You can\nconfigure a different replacement character as follows:\n\n```yaml\ngitSafeReplacementChar: '-'\n```\n\nThe above configuration would generate the following branch name for issue 15 that has the title \"Fix nasty\nbug\": `issue-15-Fix-nasty-bug`.\n\nFurthermore, you also can replace arbitrary characters in the branch title:\n\n```yaml\ngitReplaceChars: 'ab/'\n```\n\nThe above configuration replaces all occurences of the characters 'a', 'b' and '/' in the branch title.\n\n## Automatically link pull request with issue\n\nThis app can automatically link a pull request to the issue for which the issue\nbranch (of the pull request) was created. You can enable this feature with:\n\n```yaml\nautoLinkIssue: true\n```\n\nBe aware that the app needs to be able to find the issue number in the branch\nname, otherwise this feature will not work. This feature only works if one of\nthe following is true for your app configuration:\n\n- You use the default `branchName` setting\n- Your `branchName` setting is `tiny`, `short` or `full`\n- Your branch name starts with the issue number\n- Your branch name contains the string `issue-` (case insensitive) followed by\n  the issue number, for example: `Project-A-Issue-123-Rewrite_in_Clojure`\n\n## Automatically close issues after a pull request merge\n\nThis app can close issues automatically for you when a pull request for an\nissue branch is merged. You can enable this feature with:\n\n```yaml\nautoCloseIssue: true\n```\n\nBe aware that the app needs to be able to find the issue number in the branch\nname, otherwise this feature will not work. This feature only works if one of\nthe following is true for your app configuration:\n\n- You use the default `branchName` setting\n- Your `branchName` setting is `tiny`, `short` or `full`\n- Your branch name starts with the issue number\n- Your branch name contains the string `issue-` (case insensitive) followed by\n  the issue number, for example: `Project-A-Issue-123-Rewrite_in_Clojure`\n\n## Automatically delete issue branch after closing an issue\n\nThis app can delete issue branches for you when a related issue is closed. You\ncan enable this feature with:\n\n```yaml\nautoDeleteBranch: true\n```\n\nBe aware that the app needs to be able to find the issue number in the branch\nname, otherwise this feature will not work. See also the explanation in [this\nsection](#Automatically-close-issues-after-a-pull-request-merge).\n\n## Default source branch\n\nYou can override the source branch (by default\nthe [\"default branch\"](https://docs.github.com/en/github/administering-a-repository/managing-branches-in-your-repository/changing-the-default-branch)\nof the repository is used) in the configuration like this:\n\n```yaml\ndefaultBranch: 'dev'\n```\n\n## Source branch based on issue label\n\nYou can override the source branch based on the issue label.\n\nFor example, if you want branches for issues with the `enhancement` label to have the `dev` branch as a source, and\nbranches for issues with the `bug`\nlabel to have the `staging` branch as a source, add this to your configuration YAML:\n\n```yaml\nbranches:\n  - label: enhancement\n    name: dev\n  - label: bug\n    name: staging\n```\n\nThe `label` field also takes a list of label names. In that case all labels in the list must be matched by labels of the\nissue. For example:\n\n```yaml\nbranches:\n  - label:\n      - enhancement\n      - docs\n    name: docs\n  - label: enhancement\n    name: dev\n```\n\nIn the configuration above issues with the labels `enhancement` _and_ `docs` will have the `docs` branch as a source,\nwhile issues with an `enhancement` label _but not_ a `docs` label will have the `dev` branch as a source.\n\nWhen issues have multiple labels the branch of the first match (based on the order in the configuration YAML will be\nused).\n\nIf a configured branch does not exist in the repository the [default branch](#default-source-branch) is used.\n\n## Branch name prefix based on issue label\n\nBranch names can be prefixed based on the label of an issue.\n\nFor example, if you want branches for issues with the `enhancement` label to have the `feature/` prefix and branches for\nissues with the `bug` label to have the `bugfix/` prefix, add this to your configuration YAML:\n\n```yaml\nbranches:\n  - label: enhancement\n    prefix: feature/\n  - label: bug\n    prefix: bugfix/\n```\n\nYou can use `${...}` placeholders in the prefix to substitute fields from the GitHub issue assignment JSON object. For\nexample, if you want the GitHub login name of the user that created the issue in the branch prefix, add this to your\nconfiguration YAML:\n\n```yaml\nbranches:\n  - label: enhancement\n    prefix: feature/${issue.user.login}/\n```\n\nSee\n[test/fixtures/issues.assigned.json](tests/test-fixtures/issues.assigned.json) for all possible placeholder names.\n\n## Skip runs for issues based on issue label\n\nRuns of this App/Action can be skipped based on the label of an issue.\n\nFor example, if you don't want to automatically create branches for issues with the\n`question` label, add this to your configuration YAML:\n\n```yaml\nbranches:\n  - label: question\n    skip: true\n```\n\n## Matching labels with wildcards\n\nWildcard characters '?' (matches any single character) and '\u0026ast;' (matches any sequence of characters, including the\nempty sequence) can be used in the label field.\n\nFor example, to set the default/fallback prefix `issues/` for issues that do not have the `enhancement`  or `bug`\nlabel, use this configuration:\n\n```yaml\nbranches:\n  - label: enhancement\n    prefix: feature/\n  - label: bug\n    prefix: bugfix/\n  - label: '*'\n    prefix: issues/\n```\n\nYou can use this default/fallback behaviour also to run the App/Action only for certain issue labels. For example, put\nthis in your configuration YAML if you want to run the App/Action only for issues with the `bug` label:\n\n```yaml\nbranches:\n  - label: bug\n    skip: false\n  - label: '*'\n    skip: true\n```\n\n*Remember to put quotes around a single asterisk ('\u0026ast;') in YAML*\n\n## Automatically open a Pull Request\n\nAutomatically open a (draft) Pull Request for the newly created branch. Enable this feature in your configuration YAML,\nfor draft pull requests use:\n\n```yaml\nopenDraftPR: true\n```\n\nand for regular pull requests use:\n\n```yaml\nopenPR: true\n```\n\nBe aware that draft pull requests are not available in all repositories types, see\nthe [GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests)\nfor details.\n\n### Pull Request target branch based on issue label\n\nYou can override the pull request target branch based on the issue label.\n\nFor example, if you want (draft) pull requests for issues with the `bug` label to have the `development` branch as a\nsource and have the pull request target branch set to `hotfix`, add this to your configuration YAML:\n\n```yaml\nbranches:\n  - label: bug\n    name: development\n    prTarget: hotfix\n```\n\n### Skip branch creation based on issue label\n\nYou can skip the creation of branches based on the issue label. This configuration option is typically used together\nwith the `openPR`/`openDraftPR` option to automatically create a (draft)PR between branches.\n\nFor example, to automatically open a PR to merge the `develop` branch in the `release` branch when the issue has a \n`release` label, add this to your configuration YAML:\n\n```yaml\nopenPR: true\nbranches:\n  - label: release\n    name: develop\n    prTarget: release\n    skipBranch: true\n```\n\n### Copy attributes from issue\n\nWhen the App opens a new (draft) Pull Request, it can also copy over the\nfollowing attributes from your issue:\n\n- Description\n- Labels\n- Assignee\n- Projects (*only available in GitHub Action, not in the App*)\n- Milestone\n\nYou can enable this behaviour per attribute in the configuration:\n\n```yaml\ncopyIssueDescriptionToPR: true\ncopyIssueLabelsToPR: true\ncopyIssueAssigneeToPR: true\ncopyIssueProjectsToPR: true\ncopyIssueMilestoneToPR: true\n```\n\n### Copy pull request template\n\nWhen the App opens a new (draft) Pull Request, it can also copy over a pull\nrequest template from a file in your repository. The template must be stored in\na file named `.github/pull_request_template.md`.\n\nYou can enable this behaviour in the configuration:\n\n```yaml\ncopyPullRequestTemplateToPR: true\n```\n\n### Skip CI workflows\n\nAutomatically opening a (draft) PR for an issue requires an empty commit on the newly created branch (this is a\nrequirement by GitHub). This first empty commit might trigger GitHub Actions CI workflows. You can skip these\nworkflows with the following configuration option:\n\n```yaml\nprSkipCI: true\n```\n\n## Conventional Pull Request titles\n\nWhen this option is enabled, a [Conventional\nCommit](https://www.conventionalcommits.org/) prefix (including a\n[gitmoji](https://gitmoji.dev/)) is automatically added to the PR title based\non issue \u0026 PR labels.\n\nFor example, if there's an issue \"Fix nasty bug\" and accompanying branch\n`issue-123-Fix-nasty-bug`, where either the issue or the PR are labeled as\n\"bug\", then whenever a Pull Request for the branch is opened (automatically or\nmanually) Create Issue Branch will prepend \"fix: 🐛\" to the Pull Request title,\nfor example \"fix: 🐛 isssue 123 Fix nasty bug\". \n\nConventional PR titles create a clear and beautiful Git history. They also make\nit possible to implement automated [Semantic Versioning](https://semver.org/)\nof your software using tools such as [Semantic\nRelease](https://semantic-release.gitbook.io/semantic-release/).\n\nBy default, for issues/PRs that are labeled with \"breaking change\" (or\n\"breaking-change\") there will be an exclamation mark added to the title, for\nexample: \"feat!: ✨ Change in API\".\n\nYou can enable conventional Pull Request titles with the following\nconfiguration option:\n\n```yaml\nconventionalPrTitles: true\n```\n\nThis feature works best if you enable only \"Allow squash merging\" on your\nrepository settings page:\n\n![Pull Requests Settings](docs/pull-requests-settings.png)\n\n### Configuring Conventional Pull Requests style\n\nThere are three prefix styles you can select: semver (default),\nsemver-no-gitmoji, and gitmoji. You can configure the prefix style with the\nfollowing configuration option:\n\n```yaml\nconventionalStyle: semver\n```\n\nor:\n\n```yaml\nconventionalStyle: semver-no-gitmoji\n```\n\nor:\n\n```yaml\nconventionalStyle: gitmoji\n```\n\n#### semver (default) example\n\nWith the \"semantic versioning\" (`semver`) style, Create Issue Branch will\nprepend \"fix: 🐛\" to the Pull Request title, for example \"fix: 🐛 isssue 123\nFix nasty bug\"\n\n#### semver-no-gitmoji example\n\nWith the `semver-no-gitmoji` style, Create Issue Branch will prepend \"fix: \" to\nthe Pull Request title, for example \"fix: isssue 123 Fix nasty bug\"\n\n#### gitmoji example\n\nWith the `gitmoji` style, Create Issue Branch will prepend \"🐛 \" to the Pull\nRequest title, for example \"🐛 isssue 123 Fix nasty bug\"\n\n\n### Configuring Conventional Pull Request prefixes\n\nPrefixes and emoji's for labels can be configured through the option\n`conventionalLabels`. This is the default:\n\n```yaml\nconventionalLabels:\n  fix:\n    bug: '🐛'\n    dependencies: '⬆️'\n    security: '🔒'\n  feat:\n    enhancement: '✨'\n  build:\n    build: '🔧'\n  chore:\n    chore: '♻️'\n  ci:\n    ci: '👷'\n  docs:\n    documentation: '📝'\n  style:\n    style: '💎'\n  refactor:\n    refactor: '♻️'\n  perf:\n    performance: '⚡️'\n  test:\n    test: '✅'\n  breaking:\n    breaking-change: '💥'\n    breaking change: '💥'\n```\n\nFor example, to change the emoji for label \"bug\":\n\n```yaml\nconventionalLabels:\n  fix:\n    bug: '🚑'\n```\n\nOr to add a new label type for features:\n\n```yaml\nconventionalLabels:\n  feat:\n    new-stuff: '🚀'\n```\n\nOr to add a new prefix:\n\n```yaml\nconventionalLabels:\n  my-prefix:\n    my-label: '🏷️'\n    breaking: true\n```\n\nNote: for backwards compatibility, `features` and `feat` will both result in a\nprefix `feat`.\n\n## Change message in issue comments\n\nThe default message displayed in the issue comments after a branch is created (and\n[silent mode](#silent-or-chatty) is not enabled) is:\n\n```\nBranch ${branchName} created!\n```\n\nYou can customize this message with the `commentMessage` option in the configuration YAML. In the string value for this\noption `${branchName}` is substituted with the name of the newly created branch and other `${...}` placeholders are\nsubstituted with fields from the GitHub issue assignment JSON object.\n\nFor example, if you would like to have the original issue title in the comment, confgure it like this:\n\n```yaml\ncommentMessage: 'Branch ${branchName} created for issue: ${issue.title}'\n```\n\nSee\n[test/fixtures/issues.assigned.json](tests/test-fixtures/issues.assigned.json) for all possible placeholder names.\n\n## Experimental features\n\nThe features below are experimental and may be removed some day or promoted to standard features.\n\n### Branch name as ChatOps command argument\n\nAs discussed in [this issue](https://github.com/robvanderleek/create-issue-branch/issues/127), enabling this feature\nallows you to give the branch name as an argument to the `/cib` ChatOps command. For example: `/cib Simple NPE fix` will\ncreate a branch named `issue-1-Simple_NPE_fix`\n\n```yaml\nexperimental:\n  branchNameArgument: true\n```\n\n# Development\n\n## Unit Test Coverage\n\n#### Jest/Istanbul:\n\nUnit Tests and coverage are implemented using Jest and Istanbul.\n\nThe snippet below shows the script which, upon execution, generates a coverage directory with coverage reports that are\nthen used by CodeCov to generate a dashboard (*description for CodeCov below the snippet*)\n\n```javascript \n\"coverage\"\n:\n\"jest --collect-coverage\"\n```\n\n#### CodeCov\n\nNote: CodeCov is a third-party test coverage tool which can be associated to your GitHub repository to create a\ndashboard based on visual representations of test coverage. CodeCov also tracks improvements in coverage on every push\nonce linked. For more information: https://docs.codecov.io/docs\n\nUsed CodeCov to generate a coverage dashboard through a bash command run in the prod/dev pipelines.\n\nThe bash script can only run if:\n\n* You have a 'codecov' account (just log in with your GitHub account)\n* The repository on your GitHub account is linked to your CodeCov account.\n* You have a GitHub secret named `CODECOV_SECRET_TOKEN` which has the value of the token generated by CodeCov\n\nPlease note that once your repository is linked with your CodeCov account you will receive an authentication token\ngenerated by CodeCov which you will have to save as `CODECOV_SECRET_TOKEN` in your GitHub secrets for this repository.\nThe bash script upon execution will provide a link to your CodeCov dashboard on your account.\n\nThe snippet below shows the workflow which runs the coverage command through yarn and bash script to generate a\ndashboard on CodeCov.io:\n\n```yaml\n - run: yarn run coverage\n - run: bash \u003c(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_SECRET_TOKEN }}\n```\n\n# Feedback, suggestions and bug reports\n\nPlease create an issue here:\nhttps://github.com/robvanderleek/create-issue-branch/issues\n\nIf you like this Action/App, please star :star: it.\n\n## Project history\n\nCreate Issue Branch was Built in response to this feature request issue:\nhttps://github.com/isaacs/github/issues/1125 (that issue is now closed and the\ndiscussion [continuous\nhere](https://github.com/github/feedback/discussions/3441) and\n[here](https://github.com/github/feedback/discussions/12290))\n\nEarly 2022 GitHub added a \"Create a branch\" button [to the web\nUI](https://github.blog/changelog/2022-03-02-create-a-branch-for-an-issue/)\nPerhaps the new GitHub button will be sufficient for your development workflow,\nif not give this App/Action a try.\n\n## Star history\n\n[![Star History Chart](https://api.star-history.com/svg?repos=robvanderleek/create-issue-branch\u0026type=Date)](https://star-history.com/#robvanderleek/create-issue-branch\u0026Date)\n\n## Features under consideration\n\nThe list below contains features that might or might not be implemented in the future. Comment or +1 if this feature is\nuseful for your use-case.\n\n- Add Projects integration (see issue [#142](https://github.com/robvanderleek/create-issue-branch/issues/142))\n- Add issue label management functionality (see\n  issue [#177](https://github.com/robvanderleek/create-issue-branch/issues/177))\n- Choose branch to branch from in ChatOps mode (see\n  issues [#155](https://github.com/robvanderleek/create-issue-branch/issues/155)\n  and [#213](https://github.com/robvanderleek/create-issue-branch/issues/213))\n\n# Contributing\n\nIf you have suggestions for how create-issue-branch could be improved, or want\nto report a bug, [open an\nissue](https://github.com/robvanderleek/create-issue-branch/issues)! All and\nany contributions are appreciated.\n\nFor more, check out the [Contributing Guide](docs/CONTRIBUTING.md).\n\n# License\n\n[ISC](LICENSE) © 2019 Rob van der Leek \u003crobvanderleek@gmail.com\u003e\n(https://twitter.com/robvanderleek)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobvanderleek%2Fcreate-issue-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobvanderleek%2Fcreate-issue-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobvanderleek%2Fcreate-issue-branch/lists"}