diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..31eec73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,18 @@ +--- +name: 버그 리포트 +about: 버그나 오작동을 보고한다 +title: "fix: " +labels: bug +--- + +## 기능 설명 + + + +## 작업내용 + + + +## 참고문서 + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..ebd4569 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: 기능 요청 +about: 새 기능이나 개선을 제안한다 +title: "feat: " +labels: enhancement +--- + +## 기능 설명 + + + +## 작업내용 + + + +## 참고문서 + + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..dfee134 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +## 요약 + + + +## 테스트 + + + +## 참고문서 + + diff --git a/.github/workflows/label-by-title.yml b/.github/workflows/label-by-title.yml new file mode 100644 index 0000000..e5c27d3 --- /dev/null +++ b/.github/workflows/label-by-title.yml @@ -0,0 +1,38 @@ +name: Label by title prefix + +on: + issues: + types: [opened, edited] + pull_request: + types: [opened, edited] + +permissions: + issues: write + pull-requests: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const prefixToLabel = { + feat: "enhancement", + fix: "bug", + docs: "documentation", + }; + + const item = context.payload.issue ?? context.payload.pull_request; + const match = item.title.match(/^(\w+):/); + if (!match) return; + + const label = prefixToLabel[match[1]]; + if (!label) return; + + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: item.number, + labels: [label], + });