DEV Community

Cover image for πŸ“¦ Stay Organized and Efficient with Auto-Label-Pulls Github Action
Alvin James Bellero
Alvin James Bellero

Posted on β€’ Edited on

3 1 1 1 1

πŸ“¦ Stay Organized and Efficient with Auto-Label-Pulls Github Action

❓ 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"
Enter fullscreen mode Exit fullscreen mode

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

  • Second, create a configuration file (.github/config/auto-label-pulls.json) for the mapping of labels to branches.
{
  "master": "πŸš€ Production Deployment",
  "develop": "πŸ§ͺ SIT Deployment"
}
Enter fullscreen mode Exit fullscreen mode

In the above example, when a Pull Request is made to master 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! πŸ˜‰


DevCycle image

Fast, Flexible Releases with OpenFeature Built-in

Ship faster on the first feature management platform with OpenFeature built-in to all of our open source SDKs.

Start shipping

Top comments (0)

Runner H image

Automate Your Workflow in Slack, Gmail, Notion & more

Runner H connects to your favorite tools and handles repetitive tasks for you. Save hours daily. Try it free while it’s in beta.

Try for Free

πŸ‘‹ Kindness is contagious

Dive into this thoughtful piece, beloved in the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A sincere "thank you" can brighten someone's dayβ€”leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay