Giter VIP home page Giter VIP logo

pullrequest-attention-label-action's Introduction

Add an attention label to an open pull-request

A GitHub action to add an attention label on an open pull-request after certain days.

Usage

This Action uses the Pull request api which will fire on the scheduled_event .

Input

The action requires three environment variables

  • ADD_LABEL: The label name to add. Mandatory variable.
  • AFTER_DAYS: The number of days from pull request creation date. Optional variable, default value is 3 days.
  • SKIP_LABELS: The comma separated labels string. If an open pull-request have one of those label then this action will skip adding the attention label. Optional variable, default value is work-in-progress,wip.

Example Use-case

  • Problem: Let's say, we need to add an reviewer attention label need-review for code-review of an open pull-request, when it is 4 days old. We need to skip the open pull request, if already have approved/wip label. Also lets add reviewer attention label only in working days Monday-Friday(5days).
  • Solution: Schedule a GitHub action to add need-review label for those 4 days old open pull-requests.

GitHub action workflow file

name: Add an attention label to an open pull request for review after 4 days.
on:
  schedule:
  - cron:  '0 0 * * 1-5'
jobs:
  pullrequestAttentionLabel:
    runs-on: ubuntu-latest
    steps:
    - name: Add an attention label to an open pull request
      uses: crazymanish/pullrequest-attention-label-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        ADD_LABEL: "need-review"
        AFTER_DAYS: 4
        SKIP_LABELS: "approved,wip"
        REMOVE_LABELS: "helpwanted,untriaged"

GitHub action workflow execution

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

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.