A custom GitHub Action to create issues programmatically using Octokit.
- Create issues in any repository
- Add labels, assignees, and milestones
- Returns issue number and URL as outputs
- Built with @actions/github and Octokit
| Input | Description | Required | Default |
|---|---|---|---|
github-token |
GitHub token for authentication | Yes | - |
repository |
Repository in the format owner/repo |
Yes | - |
title |
Issue title | Yes | - |
body |
Issue body content | No | '' |
labels |
Comma-separated list of labels | No | '' |
assignees |
Comma-separated list of assignees | No | '' |
milestone |
Milestone number | No | - |
| Output | Description |
|---|---|
issue-number |
The number of the created issue |
issue-url |
The URL of the created issue |
name: Create Issue
on:
workflow_dispatch:
jobs:
create-issue:
runs-on: ubuntu-latest
steps:
- name: Create an issue
uses: tdupoiron-actions/create-issue@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
title: 'New Issue Title'
body: 'This is the issue description'name: Create Issue with Metadata
on:
workflow_dispatch:
jobs:
create-issue:
runs-on: ubuntu-latest
steps:
- name: Create an issue
id: create-issue
uses: tdupoiron-actions/create-issue@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
title: 'Bug Report'
body: |
## Description
Something is broken
## Steps to Reproduce
1. Step one
2. Step two
labels: 'bug, priority-high'
assignees: 'username1, username2'
milestone: 1
- name: Output issue details
run: |
echo "Issue #${{ steps.create-issue.outputs.issue-number }} created"
echo "URL: ${{ steps.create-issue.outputs.issue-url }}"-
Install dependencies:
npm install
-
Build the action:
npm run build
-
Commit the
dist/folder along with your changes
This action uses @vercel/ncc to compile the code and dependencies into a single file. Always run npm run build before committing changes.
MIT