반응형
Github Repo를 생성할 때마다 수동으로 추가하던 Label을 한 번에 적용하는 방법을 알게 되어 소개하려고 합니다.
📌 준비물
git-labels.json
"name": "라벨 이름", "color": "라벨 색상", "description": "라벨 설명"
[ { "name": "⚙ Setting", "color": "e3dede", "description": "개발 환경 세팅" }, { "name": "✨ Feature", "color": "a2eeef", "description": "기능 개발" }, { "name": "🚀 Deploy", "color": "C2E0C6", "description": "배포 관련" }, { "name": "🎨 UI Design", "color": "FEF2C0", "description": "UI 및 스타일링 관련" }, { "name": "🐞 BugFix", "color": "d73a4a", "description": "버그 수정" }, { "name": "📃 Docs", "color": "1D76DB", "description": "문서 작성 및 수정 (README.md 등)" }, { "name": "📬 API", "color": "D4C5F9", "description": "서버 API 통신" }, { "name": "🔨 Refactor", "color": "f29a4e", "description": "코드 리팩토링" }, { "name": "🙋♂️ Question", "color": "9ED447", "description": "추가 정보 요청" }, { "name": "✅ Test", "color": "ccffc4", "description": "테스트 관련(JUnit, Espresso 등)" } ]
Github Personal Access Token
Github -> Settings -> Developer Settings -> Personal Access Tokens -> Classic
Repository 관련 Scope만 체크하면 됩니다.
🌟 실행 방법
1️⃣ 위에서 생성한 git-labels.json이 위치한 폴더로 이동합니다.
2️⃣ 아래 명령어를 통해 라벨을 한 번에 적용합니다.
npx github-label-sync --access-token {AccessToken} --labels ./git-labels.json {사용자 이름}/{레포지터리 이름}
조직에 속한 Repository의 Label를 업데이트하고 싶은 경우는 아래와 같이 입력하면 됩니다.
npx github-label-sync --access-token {AccessToken} --labels ./git-labels.json {조직 이름}/{레포지터리 이름}
🔗 Financial-Times/github-label-sync
자세한 설명은 해당 링크를 참조해 주세요!
GitHub - Financial-Times/github-label-sync: Synchronise your GitHub labels with as few destructive operations as possible
Synchronise your GitHub labels with as few destructive operations as possible - Financial-Times/github-label-sync
github.com
반응형
'Etc > Git' 카테고리의 다른 글
[Git] CHANGELOG.md Generate (0) | 2024.10.26 |
---|---|
[Git] AngularJS Commit Conventions (0) | 2024.10.26 |
Github Action을 이용한 Android CI/CD 구축 with Firebase (0) | 2024.09.01 |