Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Auto Label Pull Requests

LicenseIssuesStars

⚡️🔖 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 Nameon:
pull_request:
types: [opened]jobs:
label:
runs-on: ubuntu-lateststeps:
...
- name: Assign labels based on target branchuses: shiftEscape/auto-label-pulls@v1.0.0with:
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.

About

⚡️ Automates the process of assigning labels to your pull requests based on the target branch

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors