Giter Site home page Giter Site logo

jbang-issuelabeler's Introduction

Issue labeler built with jbang

This container is a github action used to automatically label issues based on title and description content.

Source

Github Action

Inputs

Outputs

Example usage

CONFIG defaults to be .github/autolabeler.yml which requires you to use checkout which can take unnecessary time thus recommendation is to pass a URL to CONFIG instead.

on:
    issues:
        type: [opened]

jobs:
    jbang:
      runs-on: ubuntu-latest
      name: A job to run jbang
      steps:
      - name: issuelabeler
        uses: maxandersen/jbang-issuelabeler@master
        env:
          GITHUB_TOKEN: ${{ secrets.ISSUE_GITHUB_TOKEN }}
          CONFIG: https://raw.githubusercontent.com/maxandersen/githubaction-testinggrounds/master/.github/autoissuelabeler.yml

autolabeler.yml

To define what should be labelled create a file in .github/autolabeler.yml

- labels: [area/hibernate, need-review]
  
  expression: |
              title_description.matches("(?is).*hibernate.*") 
              and
              !title_description.matches("(?is).*validator.*") 
  addcomment: "Validator are the bees knees!"
  notify:
    - maxandersen
    - gsmet
    - sanne
- labels: [bug]
  title: "^[bug] .*"

Each item is a "rule" and the meaning of each attribute is as follows:

Attribute Description Exmample
labels list of labels to add if match found [area/hibernate, triage]
title Java regular expression to match against issue title. (?i).*qute.*
description Java regular expression to match against issue description. Useful to use (?si) to activate matching across newlines and ignore casing. (?si).*qute.*
expression javax.el expression that should evaluate to a boolean. Can refer to title, description, title_description attributes. title.matches(".*hibernate.*") and !description.contains(".*validator.*")
addcomment free-form text which will be added as a comment /cc @maxandersen please review
notify array of usernames or groups to notify in a comment. If user created the issue he will not be notified. [maxandersen,sanne]

jbang-issuelabeler's People

Contributors

maxandersen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

jbang-issuelabeler's Issues

Enhancement - Auto label PRs and issues with a fix version?

In context of oracle/graal#2764 (comment) would it be possible to automate this through this issuelabeler project? Whenever a PR gets merged perhaps look for a specific file within the repo to know the "next release version" and use that value to set the Milestone of that merged PR to this value? If setting the milestone isn't doable then perhaps add a "Fix version: the-version" kind of label? If this works, then maybe it can even be extended to do this same thing on issues that get closed when the corresponding PR is closed?

Of course, someone will have to maintain that file containing the "next project version" and ensure that on every release it is up to date. Perhaps allow the file to be configurable and some regex that determines how to "find" a version in that file, so that existing project artifacts (like a pom.xml or in case of mx builds their equivalent file) can be used to infer the version?

P.S: I've no idea if this is even in the scope of this project, but I thought I'll just go ahead and ask :)

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.