Coder Social home page Coder Social logo

muthuannamalai12 / auto-label Goto Github PK

View Code? Open in Web Editor NEW

This project forked from renato66/auto-label

0.0 0.0 0.0 1.5 MB

Auto Label Issue Based on Issue Description

Home Page: https://renato66.github.io/auto-label/

License: MIT License

Dockerfile 0.34% TypeScript 68.22% JavaScript 31.45%

auto-label's Introduction

Auto-label

Unit test Auto Label codecov

image

The Auto label action will check for every new issue and automatically adds a label based on the body of the issue. This means that finding specifc issues will be much more easy.

Creating

Check out the app to make yml file https://renato66.github.io/auto-label/

or

add a file to .github/workflows/issue.yml

name: Labeling new issue
on:
  issues:
    types: ['opened']
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: Renato66/auto-label@v2
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          ignore-comments: true
          labels-synonyms: '{"bug":["error","need fix","not working"],"enhancement":["upgrade"],"question":["help"]}'
          labels-not-allowed: '["good first issue"]'
          default-labels: '["help wanted"]'

Inputs

Name Description Required Default Examples
repo-token Github token for the repository true - ...
ignore-comments Ignore labels inside issue comments false true ...
labels-synonyms Text synonyms for labels false - ...
labels-not-allowed Labels to ignore false - ...
default-labels Labels that will always be set false - ...

Repo Token

Repo token is provided automaticly by github just need to add

repo-token: ${{ secrets.GITHUB_TOKEN }}

Change bot apperance

If you want to change who added the labels, you can provide a user token

image

image

The token will only need the public_repo scope

You will need to provide it as secret GITHUB_USER_TOKEN and update the issue.yml repo-token with: repo-token: ${{ secrets.GITHUB_USER_TOKEN }}

Ignore Comments

If you prefer to leave as default (true) You can provide a list of labels in a template for the author to choose wich labels are avaliable to pick But if you prefer to set it as false, the author can set the labels inside a comment so it doesn't appear on issue body

Scoped blocks

You can set a custom part of your issue/pr to be labeled using this structure:

Some text that could have a label that wouldn't be set
<!-- AUTO-LABEL:START -->
Another text that could have a label and will be set as a label
<!-- AUTO-LABEL:END -->

thanks to @dielduarte and @PauloGoncalvesBH

Labels Synonyms

Sometimes labels can be set uppon other texts, as an example, if you have a label like C: VCombobox it would be hard to match the label in a normal issue, but you can provide a JSON to set it synonyms:

labels-synonyms: '{"C: VCombobox":["combobox","v-combobox","combo box"]}'

Labels Not Allowed

Some labels are restricted to repo owners such as needs priority testing won't fix they can be set in an Array form:

labels-not-allowed: '["needs priority","testing","won't fix"]'

Default Labels

Labels that will always be set when a issue is created/updated such as triage, they can be set in an Array form:

default-labels: '["triage"]'

Badge

To add a badge simple replace owner and repository

Auto Label

<!-- Replace <OWNER> and <REPOSITORY>. It assumes workflow name is "Labeling%20new%20issue" -->
[![Auto Label](https://github.com/<OWNER>/<REPOSITORY>/workflows/Labeling%20new%20issue/badge.svg)](https://github.com/Renato66/auto-label)

auto-label's People

Contributors

dependabot[bot] avatar dielduarte avatar renato66 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.