Create an Issue Action
A GitHub Action that creates a new issue using a template file.
Usage
This GitHub Action creates a new issue based on an issue template file. Here's an example workflow that creates a new issue any time you push a commit:
# .github/workflows/issue-on-push.yml
on: [push]
name: Create an issue on push
permissions:
contents: read
issues: write
jobs:
stuff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This reads from the .github/ISSUE_TEMPLATE.md
file. This file should have front matter to help construct the new issue:
---
title: Someone just pushed
assignees: JasonEtco, matchai
labels: bug, enhancement
---
Someone just pushed, oh no! Here's who did it: {{ payload.sender.login }}.
You'll notice that the above example has some {{ mustache }}
variables. Your issue templates have…