Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
bookmark

GitHub Action

Actions Ecosystem Remove Labels

v1.1.0

Actions Ecosystem Remove Labels

bookmark

Actions Ecosystem Remove Labels

Remove labels to an issue or a pull request

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Actions Ecosystem Remove Labels

uses: actions-ecosystem/[email protected]

Learn more about this action in actions-ecosystem/action-remove-labels

Choose a version

Action Remove Labels

actions-workflow-test release license

screenshot

This is a GitHub Action to remove GitHub labels to an issue or a pull request.

This action extract the number from an issue or a pull request which has triggered this by default. It means you don't need to care about something annoying like whether you should use ${{ github.event.issue.number }} or ${{ github.event.pull_request.number }}.

It would be more useful to use this with other GitHub Actions' outputs.

Inputs

NAME DESCRIPTION TYPE REQUIRED DEFAULT
github_token A GitHub token. string true N/A
labels The labels' name to be removed. Must be separated with line breaks if there're multiple labels. string true N/A
number The number of the issue or pull request. number false N/A
repo The owner and repository name. e.g.) Codertocat/Hello-World string false ${{ github.event.issue.number }} or ${{ github.event.pull_request.number }}

Example

Remove a single label with a comment

name: Remove Label

on: [issue_comment]

jobs:
  remove_label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-ecosystem/action-remove-labels@v1
        if: ${{ startsWith(github.event.comment.body, '/remove-labels') }}
        with:
          github_token: ${{ secrets.github_token }}
          labels: bug

Remove multiple labels with a comment

name: Remove Labels

on: [issue_comment]

jobs:
  remove_labels:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-ecosystem/action-remove-labels@v1
        if: ${{ startsWith(github.event.comment.body, '/remove-labels') }}
        with:
          github_token: ${{ secrets.github_token }}
          labels: |
            documentation
            changelog

License

Copyright 2020 The Actions Ecosystem Authors.

Action Remove Labels is released under the Apache License 2.0.