Skip to content
An action for automatically labelling issues
TypeScript JavaScript
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Branch: master
Clone or download
Latest commit ec4585e Jan 16, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__ Create main.test.ts Jan 15, 2020
src Update main.ts Jan 16, 2020
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
SECURITY.md
action.yml
jest.config.js
package-lock.json
package.json
tsconfig.json

README.md

Issue Labeler

Issue labeler will label issues based on the body content of the issue.

Usage

Create .github/labeler.yml

Create a .github/labeler.yml file with a list of labels and regex to match to apply the label.

The key is the name of the label in your repository that you want to add (eg: "merge conflict", "needs-updating") and the value is the regular expression for when to apply the label. Should the regular expression not match, the label will be removed.

Basic Examples

# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical'
impact:external:
    - '(critical|urgent)'

Create Workflow

Create a workflow (eg: .github/workflows/labeler.yml see Creating a Workflow file) to utilize the labeler action with content:

name: "Issue Labeler"
on:
  issues:
    types: [opened, edited]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - uses: github/issue-labeler@v1
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"
        configuration-path: .github/labeler.yml
        not-before: 2020-01-15T02:54:32Z

not-before is optional and will result in any issues prior to this timestamp to be ignored. Note: This grants access to the GITHUB_TOKEN so the action can make calls to GitHub's rest API

You can’t perform that action at this time.