Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #15 from YAPP-Github/main #16

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# docs 폴더 하위에 있는 파일이 변경되면 documentation 라벨을 붙인다.
documentation:
- changed-files:
- any-glob-to-any-file: "**/docs/**"

# config 폴더 하위에 있는 파일이 변경되거나, 브랜치 이름이 config로 시작하면 config 라벨을 붙인다.
config:
- changed-files:
- any-glob-to-any-file: "**/config/**"
- head-branch: ["^config", "config"]

# scripts 폴더 하위에 있는 파일이 변경되면 script 라벨을 붙인다.
script:
- changed-files:
- any-glob-to-any-file: "**/scripts/**"

# 브랜치 이름이 feat 또는 feature로 시작하면 feature 라벨을 붙인다.
feature:
- head-branch: ["^feat", "feat", "^feature", "feature"]

# 브랜치 이름이 refactor로 시작하면 refactor 라벨을 붙인다.
refactor:
- head-branch: ["^refactor", "refactor"]

# 브랜치 이름이 fix로 시작하면 fix 라벨을 붙인다.
fix:
- head-branch: ["^fix", "fix"]

# 브랜치 이름이 test로 시작하면 test 라벨을 붙인다.
test:
- head-branch: ["^test", "test"]
26 changes: 26 additions & 0 deletions .github/workflows/auto-assign-author-to-assigness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: auto assign author to assignees

on:
pull_request:
types: [opened]

jobs:
add-assignees:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Add assignee
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: [context.payload.pull_request.user.login]
})
43 changes: 15 additions & 28 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
# docs 폴더 하위에 있는 파일이 변경되면 documentation 라벨을 붙인다.
documentation:
- changed-files:
- any-glob-to-any-file: "**/docs/**"
name: "auto assign label to pull request"

# config 폴더 하위에 있는 파일이 변경되거나, 브랜치 이름이 config로 시작하면 config 라벨을 붙인다.
config:
- changed-files:
- any-glob-to-any-file: "**/config/**"
- head-branch: ["^config", "config"]
on:
- pull_request_target

# scripts 폴더 하위에 있는 파일이 변경되면 script 라벨을 붙인다.
script:
- changed-files:
- any-glob-to-any-file: "**/scripts/**"
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# 브랜치 이름이 feat 또는 feature로 시작하면 feature 라벨을 붙인다.
feature:
- head-branch: ["^feat", "feat", "^feature", "feature"]

# 브랜치 이름이 refactor로 시작하면 refactor 라벨을 붙인다.
refactor:
- head-branch: ["^refactor", "refactor"]

# 브랜치 이름이 fix로 시작하면 fix 라벨을 붙인다.
fix:
- head-branch: ["^fix", "fix"]

# 브랜치 이름이 test로 시작하면 test 라벨을 붙인다.
test:
- head-branch: ["^test", "test"]
- uses: actions/labeler@v5
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
configuration-path: .github/labeler.yml
Loading