Before starting work on a reported issue, a pull-request
can be created arbitrarily by using the --allow-empty
option of the git commit
command.
- Use
issue_comment
event trigger
on:
issue_comment:
types: [created]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
create-pr:
runs-on: ubuntu-latest
if: ${{ !github.event.issue.pull_request }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create PR when issue_comment event occured
if: ${{ startsWith(github.event.comment.body, '@pr ') }}
uses: chyccs/empty-pr-actions@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Use
issues
event trigger
on:
issues:
types: [opened, edited]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
create-pr:
runs-on: ubuntu-latest
if: ${{ !github.event.issue.pull_request }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create PR when issues was created
uses: chyccs/empty-pr-actions@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}