Skip to content

[Docs] PR title parsing ์‹œ ๊ธ€์”จ๊ฐ€ ๊นจ์ง€๋Š” ๋ฌธ์ œ #33

[Docs] PR title parsing ์‹œ ๊ธ€์”จ๊ฐ€ ๊นจ์ง€๋Š” ๋ฌธ์ œ

[Docs] PR title parsing ์‹œ ๊ธ€์”จ๊ฐ€ ๊นจ์ง€๋Š” ๋ฌธ์ œ #33

name: Issue Controller
on:
issues:
types: [opened, edited]
jobs:
add-labels:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Assign Zerohertz to issue
if: github.event_name == 'issues' && github.event.action == 'opened'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: ['Zerohertz']
})
- name: Add 'fix' label
if: contains(github.event.issue.title, '[Bug]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['fix']
})
- name: Add 'chore' label
if: contains(github.event.issue.title, '[Chore]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['chore']
})
- name: Add 'style' label
if: contains(github.event.issue.title, '[Style]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['style']
})
- name: Add 'docs' label
if: contains(github.event.issue.title, '[Docs]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['docs']
})