GithubHelp home page GithubHelp logo

naturalclar / issue-action Goto Github PK

View Code? Open in Web Editor NEW
60.0 4.0 20.0 17.36 MB

github action for github issue

License: MIT License

JavaScript 2.69% TypeScript 97.31%
github actions github-actions issue-tracker assign

issue-action's Introduction

TestBuild Assign Label

Issue Action

Github action for automatically adding label or setting assignee when a new Issue or PR is opened.

Usage

Title or Body

Choose whether you want to check for a keyword match in the issue title, the issue body, or both.

Parameters

Automatically set BUG label and assign @username when Issue contains bug or error. Automatically set help-wanted label and assign @username when Issue contains help or guidance.

Example

name: "Set Issue Label and Assignee"
on:
  issues:
    types: [opened]
  pull_request:
    typed: [opened]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: Naturalclar/[email protected]
        with:
          title-or-body: "both"
          parameters: [ {"keywords": ["bug", "error"], "labels": ["BUG"], "assignees": ["username"]}, {"keywords": ["help", "guidance"], "labels": ["help-wanted"], "assignees": ["username"]}]
          github-token: "${{ secrets.GITHUB_TOKEN }}"

Upgrading this package

Follow the steps below:

# create a new release branch
$ git checkout -b release/vX.X.X
$ yarn build
$ git commit -a -m "release"
$ git push origin release/vX.X.X

issue-action's People

Contributors

brian-williams avatar delazj avatar dependabot-preview[bot] avatar dependabot[bot] avatar kdeldycke avatar naturalclar avatar somayab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

issue-action's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

bug/question: define multiline json string for `parameters`

Hi, I'm struggling to define parameters on multiple lines.

Why multiple lines? as our project is quite big we need lot of rules, which if defined inline became hard to read/maintain/bad DX

None of these works:

parameters: >
            '[
              {"keywords": ["projectA"], "labels": ["A"]},
              {"keywords": ["projectB"], "labels": ["B"]},
              {"keywords": ["projectC"], "labels": ["C"]}
            ]'
parameters: >
            '`[
              {"keywords": ["projectA"], "labels": ["A"]},
              {"keywords": ["projectB"], "labels": ["B"]},
              {"keywords": ["projectC"], "labels": ["C"]}
            ]`'

both will trigger JSON parse error
image

Do you have any suggestion how to achieve that ?

Thank you!

Label

set label automatically

Fix typo in README.md

The typos in the example section of the README file are confusing as mentioned in #87 and #116.

Would be nice to fix up these typos to ease people setting up for using this tool.

Label

Set label automatically if body contains label

Action fails when a keyword is set to an invalid regex expression

This commit made it so that keywords are treated as regular expressions, as opposed to literal strings before.

This resulted in our action failing with:

issue content: chore: fix unmatched parenthesis in issue-label-assign
Error: Invalid regular expression: /(?!-)\bevent-bridge)\b(?!-)/: Unmatched ')'

While its true we had missing parentheses in our configuration, i'm not sure this was the intended behavior, as the commit title seems to suggest it was just meant validate the keyword itself was surrounded with alphanumeric characters.

If it is meant as a regular expression, I suggest to add this to the documentation, and mention this is actually a breaking change. If not, the keyword needs to be properly escaped.

Feature Request: only check for keywords not surrounded by alpha characters

Here's an example of my use case: I'm parsing for the the keyword "CLI" but if someone has the word "clip" in their issue the action thinks there's a match when there shouldn't be. I want it to be able to pick up the keyword even if it's surrounded by non alpha characters though, like "(CLI)" should work and "CLI: asdhasd" should too.

Hoping this is useful for other people.

I have an almost complete fix. Will put in a PR shortly.

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.