Skip to content
tag

GitHub Action

tf-labeler

v1.2 Latest version

tf-labeler

tag

tf-labeler

Helps you add and remove labels of all PRs in a given repo

Installation

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

              

- name: tf-labeler

uses: Typeform/[email protected]

Learn more about this action in Typeform/labeler

Choose a version

labeler

A Github Action that helps you to add and remove labels of all PRs in a given repo.

Usage

Input Variables:

github-token: Mandatory, Github API TOKEN. More info
repository-name: Mandatory, string, the repository where the action is ran. eg: Typeform/labeler
label_action: Mandatory, option between add or remove
label: Mandatory, how you want to name your label
base-branch: Optional, filter pulls by base branch name. Default: all base branches
hard-failure: Optional, boolean, if true, fails the build on any error. If false, throws an warning instead. Default is false.

Contributing

All code should pass tests, as well as be well documented. Please also see the Commit Message Guidelines for how commit messages should be structured.

Developing

Prerequisites

  • Node.js
  • Yarn

Installation

To install the project dependencies:

yarn

Copy the contents of the .env.dist file into a new file called .env and fill in the necessary variables with your own variables.

How to run it

yarn start

How to run tests

yarn test

How to distribute

Github actions requires all the package dependencies in the repo to run the JavaScript code.
We prefer to distribute our code and modules into a single file: dist/index.js. To do that, run:

yarn distribute