Skip to content

Instantly share code, notes, and snippets.

@ljlm0402
Created November 27, 2020 01:27
Show Gist options
  • Save ljlm0402/32e5d13c63a0cb92954de0cee4373e37 to your computer and use it in GitHub Desktop.
Save ljlm0402/32e5d13c63a0cb92954de0cee4373e37 to your computer and use it in GitHub Desktop.
GitHub Label, Issue, Pull request Settings

Github Label 세팅

Label 이란?

  • Issue, PR 에 붙여서 분류하기 위한 이름표

Github 액세스 토큰 발급

https://github.com/settings/tokens

  • Generate new token 클릭
  • 원하는 이름 입력
  • scopes에서 repo 선택

image

Label 정의하기

  • labels.json 파일에 JSON Array 형태로 정의
  • name, color, description 을 정의할 수 있음
[
  {
    "name": "Priority: Critical",
    "color": "8c001a",
    "description": "우선순위 긴급"
  }
]

정의 된 Label 적용하기

  • 액세스 토큰, 계정명, 저장소 이름을 자신의 것으로 변경
npx github-label-sync --access-token [액세스 토큰] --labels labels.json [계정명]/[저장소 이름]

Label 설정 적용 전

image

Label 적용 후

image

Issue Template

Issues 탭에서 New issue 버튼을 눌렀을 때 미리 정의 된 템플릿을 선택할 수 있음

Issue Template 정의하기

  • 마크다운 형식으로 파일 생성
  • name, about, title, labels, assignees를 미리 지정할 수 있음
  • labels 의 경우 위에서 정의 한 label name을 지정하면 됨

예시

---
name: Bug Report Template
about: 버그 리포트 템플릿입니다.
title: ''
labels: 'Status: To Do, Priority: Medium, Type: Bugfix/Function, Type: Bugfix/UI'
assignees: ''
---

# 발생 일시

# 발생 위치

# 증상

# 재현 방법

# 스크린샷

Issue Template 적용

  • 추가 된 파일을 github 원격에 push 한 후 New issue 버튼을 누르게 되면 아래와 같이 선택 화면이 나옴

image

Pull Request Template

  • 마크다운 형식으로 파일 생성
  • pull_request_template.md로 파일 이름 지정

예시

# 반영 브랜치

# 변경 사항

# 확인 방법 (스크린샷 포함)

Pull Request Template 적용

image


참고

github-label-sync

Using templates to encourage useful issues and pull requests

[
{
"name": "Priority: Critical",
"color": "8c001a",
"description": "우선순위 긴급"
},
{
"name": "Priority: High",
"color": "FF0000",
"description": "우선순위 상"
},
{
"name": "Priority: Low",
"color": "F9966b",
"description": "우선순위 하"
},
{
"name": "Priority: Medium",
"color": "E77471",
"description": "우선순위 중"
},
{
"name": "Status: Done",
"color": "a0ffb8",
"description": "리뷰까지 완료 된 이슈"
},
{
"name": "Status: Duplicated",
"color": "cfd3d7",
"description": "이미 보고 된 이슈",
"aliases": [
"duplicate"
]
},
{
"name": "Status: In Progress",
"color": "539606",
"description": "현재 처리 중인 이슈"
},
{
"name": "Status: Pending",
"color": "66e26c",
"description": "보류 중인 이슈",
"aliases": [
"wontfix"
]
},
{
"name": "Status: Reviewing",
"color": "2db78b",
"description": "처리하고 리뷰 중인 이슈"
},
{
"name": "Status: To Do",
"color": "757c06",
"description": "처리해야 되는 이슈"
},
{
"name": "Type: Bugfix/Function",
"color": "d73a4a",
"description": "정상 동작하지 않는 기능",
"aliases": [
"bug"
]
},
{
"name": "Type: Bugfix/UI",
"color": "b60205",
"description": "정상 표시되지 않는 UI"
},
{
"name": "Type: Feature/Document",
"color": "0075ca",
"description": "문서 추가 및 보완 작업"
},
{
"name": "Type: Feature/Function",
"color": "a2eeef",
"description": "새로운 기능 및 개선 사항",
"aliases": [
"enhancement"
]
},
{
"name": "Type: Feature/UI",
"color": "7057ff",
"description": "UI 수정 및 개선 사항"
},
{
"name": "Type: Hotfix",
"color": "de8ae2",
"description": "급하게 수정해야 되는 사항"
},
{
"name": "Type: Release",
"color": "c2e0c6",
"description": "배포 관련 이슈"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment