Skip to content
alert-octagon

GitHub Action

Required Labels Action

v1.1 Latest version

Required Labels Action

alert-octagon

Required Labels Action

This action prints the comment on an issue if the required labels are not added in the issue

Installation

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

              

- name: Required Labels Action

uses: foretheta/required-labels@v1.1

Learn more about this action in foretheta/required-labels

Choose a version

Required Labels Github Action

This action prints the comment on an issue if the required labels are not added in the issue. The required actions can be added in the action input using comma seperated values

Inputs

labels

Required The name of the labels that are required.

Example:

labels: "Todo, Bug"

GITHUB_TOKEN

GitHub automatically creates a GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in a workflow run.

Example: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Outputs

This action doesn't output anything

Example usage

on:
  issues:
    types: [opened, edited]

jobs:
  required_labels:
    runs-on: ubuntu-latest
    name: Required Labels
    steps:
      - name: Required Labels
        uses: muhaddimu/required-labels@master
        with:
          labels: "Todo, Bug"
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Submit Issues

Facing any Issues or weird behavior(yes, action behave)? Feel free to open a new issue


License MIT