GithubHelp home page GithubHelp logo

technote-space / auto-card-labeler Goto Github PK

View Code? Open in Web Editor NEW
35.0 4.0 6.0 11.11 MB

GitHub actions to auto label a pull request or an issue based on project card move

License: MIT License

TypeScript 98.30% JavaScript 1.31% Shell 0.39%
github-actions labels

auto-card-labeler's Introduction

Auto card labeler

CI Status codecov CodeFactor License: MIT

Read this in other languages: English, 日本語.

This is a GitHub Actions that automatically labels Issues or PullRequests based on project card moves.

Table of Contents

Details

Screenshot

GitHub Action

Usage

  1. Setup workflow
    e.g. .github/workflows/project-card-moved.yml
    on:
      project_card:
        types: [moved]
    name: Project Card Event
    jobs:
      triage:
        name: Auto card labeler
        runs-on: ubuntu-latest
        steps:
          - uses: technote-space/auto-card-labeler@v2
  2. Add action setting
    e.g. .github/card-labeler.yml
    Project name1:
      Column name1:
        - 'Status: test1'
      Column name2:
        - 'Status: test2-1'
        - 'Status: test2-2'
    Project name2:
      Column name3:
        - 'Status: test1'

Behavior

e.g.

Project name1:
  Column name1:
    - 'Status: test1'
  Column name2:
    - 'Status: test2-1'
    - 'Status: test2-2'
  1. Card created (Column name1)
    • Add
      • Status: test1
    • Remove
      • None
    • Current Labels
      • Status: test1
  2. Card moved to Column name2
    • Add
      • Status: test2-1
      • Status: test2-2
    • Remove
      • Status: test1
    • Current Labels
      • Status: test2-1
      • Status: test2-2
  3. Card moved to Column name3
    • Add
      • None
    • Remove
      • Status: test2-1
      • Status: test2-2
    • Current Labels
      • None
  4. Card moved to Column name1
    • Add
      • Status: test1
    • Remove
      • None
    • Current Labels
      • Status: test1

Options

name description default required e.g.
CONFIG_FILENAME Config file name card-labeler.yml true card-labeler-setting.yml
GITHUB_TOKEN Access token ${{github.token}} true ${{secrets.ACCESS_TOKEN}}

Action event details

Target event

eventName action
project_card moved
project_card created

Author

GitHub (Technote)
Blog

auto-card-labeler's People

Contributors

dependabot-preview[bot] avatar github-actions[bot] avatar technote-space 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

Watchers

 avatar  avatar  avatar  avatar

auto-card-labeler's Issues

Project が設定されていない場合の動作を変更

現在、project [Project name] is not found. エラーで終了させている

デフォルトを以下にする

  • project [Project name] is not found. の warning を出力
  • エラーで終了させる設定(現在の動作をさせる設定)を追加

Project not found

As like the title says, on project_card.moved, I'm getting
image

Configuration file follows what has been set in the README.

.github/card-labeler.yml -> THIS DOES NOT WORK

Project TestProject: 
  Column Todo:
    - 'To do'
  Column Reopened:
    - 'Reopened'
  Column Testing:
    - 'Testing'
  Column Ready to merge:
    - 'Ready to merge'
  Column Done:
    - 'Done'

.github/card-labeler-v2.yml -> THIS DOES NOT WORK

Project 1: # This should reflect
  Column Todo:
    - 'To do'
  Column Reopened:
    - 'Reopened'
  Column Testing:
    - 'Testing'
  Column Ready to merge:
    - 'Ready to merge'
  Column Done:
    - 'Done'

The action.yml

name: Auto labeler

on:
  project_card:
    types: [ moved ]

jobs:
  labeling:
    name: Card Labeler
    runs-on: ubuntu-latest
    steps:
      - uses: technote-space/auto-card-labeler@v2
        with:
          GITHUB_TOKEN: ${{ secrets.GIT_API_KEY }}
          CONFIG_FILENAME: card-labeler-v2.yml

Use library

  • @technote-space/filter-github-action
  • @technote-space/github-action-helper

プロジェクト名やカラム名を正規表現で検索する方法の追加

Please describe your suggestion: 提案の概要

#230

以下のいずれかを検討

  • action 側に正規表現で検索するかどうかの設定を追加
  • 設定のフォーマットを変更し、正規表現で検索するかどうかを設定できるようにする

Describe the solution you'd like: 考えうる解決方法

Describe alternatives you've considered: 考えうる代替案

Additional context: 補足

[Question] Configuring the action setting for many projects

Screenshot

image

Question

I've many projects in my private repo, I create and close projects too often How can I configure action setting for such case, Coz in settings (above screenshot), I've to write down all the projects name, but I don't want to modify the file each time I create a new project.

Build

build が必要
build して実行可能なファイルを別ブランチに配置

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.