Skip to content
anchor

GitHub Action

Simple Labeler

v1.0.1 Latest version

Simple Labeler

anchor

Simple Labeler

Automatically applies labels to a PR when it's created

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Simple Labeler

uses: naver/[email protected]

Learn more about this action in naver/simple-labeler

Choose a version

simple-labeler

🌏 ν•œκ΅­μ–΄ | English

PR 에 μžλ™μœΌλ‘œ Label 을 μΆ”κ°€ν•΄μ£ΌλŠ” κ°„λ‹¨ν•œ Github Actions

Usage

  1. μ•„λž˜μ™€ 같이 .github/workflows/simple-labeler.yml νŒŒμΌμ„ μž‘μ„±ν•©λ‹ˆλ‹€:
name: Simple Labeler
on:
  pull_request:
    types: [opened, ready_for_review]
jobs:
  simple-labeler:
    runs-on: [ubuntu-latest]
    steps:
      - name: Label to PR
        uses: naver/simple-labeler@latest
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          labels: "D-3"
          duplicate: "D-*"
  1. μ›ν•˜λŠ” 이벀트λ₯Ό on 에 λͺ…μ‹œν•©λ‹ˆλ‹€. μ—¬κΈ°μ„œλŠ” PR 생성 μ‹œ, Draft μ—μ„œ Open μƒνƒœλ‘œ μ „ν™˜ μ‹œ Label 을 μΆ”κ°€ν•©λ‹ˆλ‹€. (참고둜, Draft 생성 μ‹œμ—λŠ” λ°œμƒν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.)
  2. ν•΄λ‹Ή μ΄λ²€νŠΈκ°€ λ°œμƒν•˜λ©΄ GitHub Actions κ°€ μžλ™μœΌλ‘œ labels에 μž…λ ₯ν•œ Label 을 μΆ”κ°€ν•©λ‹ˆλ‹€.

Inputs

token

Required GitHubμ—μ„œ μ œκ³΅ν•˜λŠ” 토큰

labels

Required 이벀트 λ°œμƒ μ‹œ μΆ”κ°€ν•  Label λͺ©λ‘. 콀마(,)둜 ꡬ뢄

duplicate

기쑴에 뢙은 Label 쀑 이 νŒ¨ν„΄κ³Ό μΌμΉ˜ν•˜λŠ” 것이 μžˆλ‹€λ©΄ μƒˆ Label을 μΆ”κ°€ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. (glob νŒ¨ν„΄ μ‚¬μš©)

License

Copyright (c) 2023-present NAVER Corp.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.