Giter VIP home page Giter VIP logo

auto-label-pulls's Introduction

Auto Label Pull Requests

License Issues Stars

⚡️🔖 Automates the process of assigning label to your Pull Requests based on a target branch. This action simplifies your project management by automatically categorizing your PRs, enabling you to filter and review them more efficiently.

Features

  • Automatic Label Assignment: Labels are automatically assigned to new pull requests based on the target branch, removing the need for manual labelling.

  • Customizable: You can configure which labels correspond to which branches, allowing you to use in a way that suits your project's needs.

  • Easy to Integrate: Simply add this action to your repository's workflow and it will start working immediately.

Usage

To use, you'll need to add it as a step in your GitHub workflow file i.e (.github/workflows/main.yml), providing the necessary inputs.

name: Workflow Name

on:
  pull_request:
    types: [opened]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      ...
      - name: Assign labels based on target branch
        uses: shiftEscape/[email protected]
        with:
          token: "${{ secrets.GITHUB_TOKEN }}"
          config-path: ".github/config/branch-labels.json"

NOTE: Use this action only for pull_request event of type opened.

Configuration

You can configure this by creating a JSON configuration file (i.e .github/config/branch-labels.json) in your repository. In this file, you define the labels that should be added to pull requests for each branch. Here's a sample configuration:

{
  "master": "🚀 Production Deployment",
  "staging": "🚀 UAT Deployment",
  "development": "🚀 SIT Deployment"
}

In the example above, when a Pull Request is made to master, 🚀 Production Deployment label will be assigned to that PR and so on and so forth.

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.