Giter Club home page Giter Club logo

labeler's Introduction

Automatically adds or removes labels from issues, pull requests and project cards.

Supported Github events

  • issues
  • pull_request
  • project_card

add-labels & remove-labels

to add or remove labels the parameters are:

  • add-labels
  • remove-labels

They may receive multiple labels separated by commas. They also may be used together.

add-labels: 'label1, label2'
remove-labels: 'label3, label4'

Complete 'basic' usage

name: issue-automation

on:
  issues:
    types: [opened]
  pull_request:
    types: [opened]
  project_card:
    types: [moved]

jobs:
  automate-issues-labels:
    runs-on: ubuntu-latest
    steps:
      - name: initial labeling
        uses: andymckay/labeler@master
        with:
          add-labels: "needs-triage, bug"
          remove-labels: "in progress"

This runs on 3 types of events:

  • issues creation
  • pull_request creation
  • project_card move

This adds the labels:

  • needs-triage
  • bug

And removes the label in progress.

ignore-if-assigned

The parameter ignore-if-assigned checks at the time of the action running if the issue has been assigned to anyone. If set to True and the issue is assigned to anyone, then no labels will be added or removed. This can be helpful for new issues that immediatly get labels or assignees and don't require any action to be taken.

An example use-case would be, to remove the help-wanted label when an issue is assigned to someone. For this, the workflow file would look like:

name: issue-automation

on:
  issues:
    types: [assigned]

jobs:
  automate-issues-labels:
    runs-on: ubuntu-latest
    steps:
      - uses: andymckay/labeler@master
        with:
          remove-labels: "help-wanted"
          ignore-if-assigned: false

ignore-if-labeled

The parameter ignore-if-labeled checks at the time of the action running if the issue has been labeled. If set to True and the issue is labeled, then no labels will be added or removed. This can be helpful for new issues that immediatly get labels or assignees and don't require any action to be taken.

An example use-case would be, to add the needs-triage label when an issue is oppened without labels. For this, the workflow file would look like:

name: issue-automation

on:
  issues:
    types: [opened]

jobs:
  automate-issues-labels:
    runs-on: ubuntu-latest
    steps:
      - uses: andymckay/[email protected]
        with:
          add-labels: "needs-triage"
          ignore-if-labeled: true

labeler's People

Contributors

rodrigondec avatar dependabot[bot] avatar brcrista avatar konradpabjan avatar jnewland avatar bijujoseph avatar lionel-faber avatar natalieparellano avatar upinetree avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.