-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
39,664 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
"plugins": ["@typescript-eslint"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": "latest", | ||
"ecmaFeatures": { | ||
"jsx": false | ||
} | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": [ | ||
"node_modules/", | ||
"dist/" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-explicit-any": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 모든 파일 무시 | ||
*.* | ||
|
||
# .js .ts 파일은 무시하지 않음 | ||
!*.[jt]s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"printWidth": 120, | ||
"bracketSpacing": false, | ||
"bracketSameLine": true, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid", | ||
"semi": true, | ||
"tabWidth": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# simple-labeler | ||
|
||
PR 에 자동으로 Label 을 추가해주는 간단한 Github Actions | ||
|
||
## Usage | ||
|
||
1. 아래와 같이 `.github/workflows/simple-labeler.yml` 파일을 작성합니다: | ||
|
||
```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-*" | ||
``` | ||
2. 원하는 이벤트를 `on` 에 명시합니다. 여기서는 PR 생성 시, Draft 에서 Open 상태로 전환 시 Label 을 추가합니다. | ||
(참고로, Draft 생성 시에는 발생하지 않습니다.) | ||
3. 해당 이벤트가 발생하면 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. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Simple Labeler" | ||
description: "Automatically applies labels to a PR when it's created." | ||
inputs: | ||
token: | ||
description: "GitHub token" | ||
required: true | ||
labels: | ||
description: "List of labels to be applied when a PR is created, separated by commas." | ||
required: true | ||
duplicate: | ||
description: "If existing labels match this pattern, new labels won't be added. (Uses glob pattern)" | ||
required: false | ||
runs: | ||
using: "node16" | ||
main: "dist/index.js" |
Oops, something went wrong.