Git Product home page Git Product logo

action-pr-label-assistant's Introduction

typescript-action status

GitHub Action: PR Label Assistant

A GitHub Action that allows you to provide guidance to users on what labels they can/should apply to Pull Requests. Additionally, this Action's outputs allow you to make use of conditional/branching logic based on the presence/absence of labels on the current PR.

Example Usage

    steps:
      - name: Offer PR Label Guidance
        uses: fountainhead/[email protected]
        id: labels
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          id: default
          whitelist: needs-manual-test,preview-instance

      - name: Create/Update Preview Instance
        if: steps.labels.outputs.preview-instance == 'present'

      - name: Terminate Preview Instance
        if: steps.labels.outputs.preview-instance == 'absent'

Inputs

This Action accepts the following configuration parameters via with:

  • token

Required

The GitHub token to use for making API requests. Typically, this would be set to ${{ secrets.GITHUB_TOKEN }}.

  • id

    Required

    Some identifier that is unique on a per-repository basis to allow multiple instances of this Action to operate on the same Pull Request.

  • whitelist

    Required

    A comma-separated list of slugified, lowercase label names to match against. This whitelist is used to determine which Labels should be presented in the 'guidance' comment, and which keys are outputted by this Action.

    For example, if you had a label named:

    ๐ŸŽ‰ Let's Party! ๐ŸŽ‰

    You may match against it with a whitelist entry of lets-party.

  • pre

    Optional

    Some preamble text to display in the 'guidance' comment before the list of available Labels.

  • post

    Optional

    Some text to display in the 'guidance' comment after the list of available Labels.

Outputs

For each entry specified in the whitelist input, an output with the same name will be emiited, having one of two possible values:

  • present - The PR this Action ran against does have this Label assigned to it.
  • absent - The PR this action ran against does not have this Label assigned to it.

action-pr-label-assistant's People

Contributors

wms avatar

Watchers

 avatar  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.