new-issues
January 3, 2023 ยท View on GitHub
The new-issues reusable action is located at .github/workflows/new-issues.yml.
This reusable action depends on the following actions:
Inputs
The action has the following inputs:
Required inputs
target-repo
Specify the target repository this action should run on. This is used to prevent actions from running on repositories other than the target repository. For example, specifying a target-repo of mdn/workflows will prevent the action from running on forks of mdn/workflows.
- This
inputis required.
Optional inputs
The action has the following inputs:
add-labels
Labels to add as a comma separated list.
- This
inputis optional with a default ofneeds-triage.
Usage
In the repository that will call this action, you will need to add a .github/workflows/new-issues.yml file with the following content:
With defaults
name: "Mark new issues with specified label(s)"
on:
issues:
types:
- reopened
- opened
jobs:
label-new-issues:
uses: mdn/workflows/.github/workflows/new-issues.yml@main
with:
target-repo: "mdn/workflows"
Overriding some defaults
name: "Mark new issues with specified label(s)"
on:
issues:
types:
- reopened
- opened
jobs:
label-new-issues:
uses: mdn/workflows/.github/workflows/new-issues.yml@main
with:
add-labels: "triage, bug"
target-repo: "mdn/workflows"