โ What is auto-label-pulls
?
Auto Label Pulls is a robust GitHub Action that can significantly streamline the process of labeling Pull Requests. Its branch-based
mechanism offers the flexibility to cater to various project needs, making it an indispensable tool for any GitHub project maintainer.
Whether you have a small project or manage a large repository with tons of pull requests, auto-label-pulls
can help you stay organized and save valuable time.
๐ก Key Features
Easy to Set Up: Getting started with
auto-label-pulls
is a breeze. All you need to do is include the action in your GitHub workflow file and configure the necessary parameters.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.
๐ Getting Started
Using auto-label-pulls
is simple and straightforward:
-
First, add the action to your GitHub workflow file (
.github/workflows/main.yml
).
name: Workflow Name
on:
pull_request:
types: [opened]
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Assign labels
uses: shiftEscape/auto-label-pulls@v1.0.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
config-path: ".github/config/auto-label-pulls.json"
NOTE: Use this action only for
pull_request
event of typeopened
.
-
Second, create a configuration file (
.github/config/auto-label-pulls.json
) for the mapping oflabels
tobranches
.
{
"master": "๐ Production Deployment",
"develop": "๐งช SIT Deployment"
}
In the above example, when a
Pull Request
is made tomaster
branch, "๐ Production Deployment" label will be assigned to that PR and so on and so forth.๐ก Visit the Action's Dashboard for more info: https://github.com/marketplace/actions/auto-label-pulls
๐ And there you have it, folks!
By incorporating auto-label-pulls
into your GitHub workflow, you're not just organizing your process โ you're revolutionizing it.
Explore the tool, share your thoughts, and let's transform the open-source
space together!
Thanks for reading! ๐
Top comments (0)