Giter VIP home page Giter VIP logo

iamfj / action-label-notification Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.08 MB

Streamline your GitHub workflows with Label Notification GitHub Action! Automatically tag teams or users in issues and pull requests when specific labels are applied, enhancing collaboration and response times. Customizable, easy-to-configure, and perfect for keeping your project's communication efficient and targeted.

License: MIT License

TypeScript 86.37% JavaScript 12.98% Shell 0.65%
github-actions notifications

action-label-notification's Introduction

Label Notification GitHub Action

Introduction

Welcome to the Label-Notification GitHub Action repository. This tool is designed to automate the tagging of users or teams in pull requests or issues when specific labels are attached, solving the challenge of not being able to subscribe to labels natively in GitHub.

Features

  • Automated Tagging: Automatically tags users or teams in comments when specific labels are added.
  • Customizable Messages: Each label can have a unique message, enhancing communication clarity.
  • Supports Multiple Recipients: Add an unlimited number of users and teams as recipients.
  • YAML Configuration: Simple YAML syntax for mapping labels, messages, and recipients.
  • Dynamic Comment Updates: Automatically updates comments if a label is deleted and removes them if all labels are deleted.
  • Default Message: A default message is used if no custom message is provided.

Usage

To implement this GitHub Action in your workflow:

---
name: Labeled

on:
  pull_request:
    types:
      - labeled
      - unlabeled
  issues:
    types:
      - labeled
      - unlabeled

jobs:
  notify:
    name: Notify
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v3
      - name: Notify
        uses: ./
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          mapping: >
            - label: help wanted
              message: 'Hey !{{ recipients }}, please help me!'
              recipients:
                - '@iamfj'
            - label: bug
              recipients:
                - '@iamfj'

Options

Each option in the configuration is explained below:

  • label: The label that triggers the notification. When an issue or pull request is tagged with this label, the action is activated.

  • message (optional): A customizable message that is posted in the comment when the label is applied. If no message is provided, a default message will be used.

  • recipients (array, minimum: 1): A list of GitHub usernames or team names (prefixed with @) who will be notified. At least one recipient must be specified.

Contributing

Contributions are welcome! Please refer to the CONTRIBUTING.md file for detailed instructions on how to set up your development environment and contribute.

action-label-notification's People

Contributors

iamfj avatar dependabot[bot] avatar

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.