Skip to content

IssueOps Label Manager

Actions
Manage labels for issues and pull requests
v2.2.1
Latest
Verified creator
Star (7)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

IssueOps Labeler

Check dist/ CodeQL Continuous Integration Continuous Delivery Linter Code Coverage

Manage labels for issues and pull requests

Important

As of version v2.0.0, this action has been converted to ESM.

About

This action can be used to add and remove labels from issues and pull requests.

Setup

Here is a simple example of how to use this action in your workflow. Make sure to replace vX.X.X with the latest version of this action.

on:
  issues:
    types:
      - opened

jobs:
  example:
    name: Example
    runs-on: ubuntu-latest

    # Write permissions to issues is required
    permissions:
      issues: write

    steps:
      # Add labels to an issue in this repository
      - name: Add Labels
        id: add-labels
        uses: issue-ops/labeler@vX.X.X
        with:
          action: add
          issue_number: ${{ github.event.issue.number }}
          labels: |
            enhancement
            great-first-issue

      # Remove labels from an issue in this repository
      - name: Remove Labels
        id: remove-labels
        uses: issue-ops/labeler@vX.X.X
        with:
          action: remove
          issue_number: ${{ github.event.issue.number }}
          labels: |
            enhancement
            great-first-issue

Behavior

  • When adding labels, if you specify label(s) that do not exist and create is set to 'false' (the default), this action will fail.
  • When removing labels that do not exist, this action will continue without error.

Inputs

Input Default Description
action add The action (add or remove)
create 'false' Create label, if not present
github_token ${{ github.token }} The GitHub API token to use
labels label1 Line-separated label list
issue_number ${{ github.event.issue.number }} or ${{ github.event.pull_request.number }} The issue or PR numer
repository ${{ github.repository }} The repository (owner/repo)
api_url ${{ github.api_url }} The GitHub API URL to use

Warning

If you specify a repository other than the one the action is running in, you will need to provide a value for the github_token that has appropriate permissions (using either a PAT or a GitHub App).

IssueOps Label Manager is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Manage labels for issues and pull requests
v2.2.1
Latest

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

IssueOps Label Manager is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.