Skip to content

73 add workflow to create branch from issue #1

73 add workflow to create branch from issue

73 add workflow to create branch from issue #1

on:
# The issues event below is only needed for the default (auto) mode,
# you can remove it otherwise
issues:
types: [ assigned ]
# The issue_comment event below is only needed for the ChatOps mode,
# you can remove it otherwise
issue_comment:
types: [ created ]
pull_request:
types: [ closed ]
jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: add pr link in comment
uses: mshick/add-pr-comment@master
if: steps.create-issue-branch.outputs.branchName != ''
env:
PULL_REQUEST_URL: ${{ format('https://github.com/{0}/compare/{1}...{2}?quick_pull=1&template={3}', github.repository, github.event.repository.default_branch, steps.create-issue-branch.outputs.branchName, steps.template.outputs.template-name) }}
TEMPLATE: ${{ steps.template.outputs.template-name }}
with:
message: |
## Pull Request ![](https://raw.githubusercontent.com/primer/octicons/master/icons/git-pull-request-16.svg)
[Create a pull request](${{ env.PULL_REQUEST_URL }}) for the issue branch using the `${{ env.TEMPLATE }}` template.
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: "github-actions[bot]"