An open API service indexing awesome lists of open source software.

https://github.com/ljlm0402/auto-github-tool

πŸ€– AGT(Automatic Git & GitHub Tool)
https://github.com/ljlm0402/auto-github-tool

automatic branch git github issues pull-request tool

Last synced: 6 months ago
JSON representation

πŸ€– AGT(Automatic Git & GitHub Tool)

Awesome Lists containing this project

README

          




Project Logo




Auto GitHub Tool


πŸ€– A CLI tool to automate GitHub issue handling, branch creation, and PR submission.



npm Info



npm Version


npm Release Version


npm Downloads


npm Package License



github Stars


github Forks


github Contributors


github Issues


## AGT μ†Œκ°œ

AGT(Automatic GitHub Tool)λŠ” GitHub Issueλ₯Ό 기반으둜 브랜치 관리와 ν’€ λ¦¬ν€˜μŠ€νŠΈ(PR) 생성을 μžλ™ν™”ν•˜μ—¬ 개발자의 생산성을 ν–₯μƒμ‹œν‚€κ³ , 브랜치 κ΄€λ¦¬μ˜ 일관성을 μœ μ§€ν•˜λŠ” λ„κ΅¬μž…λ‹ˆλ‹€.

이 도ꡬλ₯Ό μ‚¬μš©ν•˜λ©΄ λ‹€μŒκ³Ό 같은 μž‘μ—…μ„ λΉ λ₯΄κ²Œ μˆ˜ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€:
- **이슈 λͺ©λ‘ 쑰회**
- **μƒˆ 이슈 생성 (제λͺ© μž…λ ₯ κ°€λŠ₯)**
- **이슈 기반 브랜치 생성**
- **PR 생성**

## πŸ“‹ λͺ©μ°¨
- [μš”κ΅¬ 사항](#μš”κ΅¬-사항)
- [μ„€μΉ˜ 및 μ‹€ν–‰](#μ„€μΉ˜-및-μ‹€ν–‰)
- [μ‚¬μš©λ²•](#μ‚¬μš©λ²•)
- [λ™μž‘ μ˜ˆμ‹œ](#λ™μž‘-μ˜ˆμ‹œ)
- [문제 ν•΄κ²°](#문제-ν•΄κ²°)

## πŸ“Œ μš”κ΅¬ 사항
- Node.js 14 이상
- GitHub CLI (gh) μ„€μΉ˜ ν•„μš”
- GitHub 계정이 ν•„μš”ν•©λ‹ˆλ‹€.

```sh
node -v # 버전 확인
gh --version # μ„€μΉ˜ 확인
```

## πŸš€ μ„€μΉ˜ 및 μ‹€ν–‰
1. **GitHub CLI μ„€μΉ˜**
```bash
# Homebrewλ₯Ό ν†΅ν•œ μ„€μΉ˜
brew install gh
```

2. **GitHub 계정 연동**
```bash
gh auth login
```
- ν”„λ‘¬ν”„νŠΈμ— 따라 μ§„ν–‰:
1. `? What account do you want to log into?` β†’ `GitHub.com` 선택
2. `? What is your preferred protocol for Git operations?` β†’ `HTTPS` 선택
3. `? Authenticate Git with your GitHub credentials?` β†’ `Yes` 선택
4. `? How would you like to authenticate GitHub CLI?` β†’ `Login with a web browser` 선택
5. ν‘œμ‹œλœ one-time codeλ₯Ό 볡사
6. μžλ™μœΌλ‘œ μ—΄λ¦¬λŠ” λΈŒλΌμš°μ €μ—μ„œ GitHub 둜그인
7. λ³΅μ‚¬ν•œ μ½”λ“œ μž…λ ₯ν•˜μ—¬ 인증 μ™„λ£Œ

3. **AGT μ˜€ν”ˆμ†ŒμŠ€ μ„€μΉ˜**
```bash
npm install -g auth-github-tool
```
μ„€μΉ˜ ν›„ agt λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•˜μ—¬ μ‹€ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

## πŸ›  μ‚¬μš©λ²•
### 1. λͺ…λ Ήμ–΄ κ°œμš”

```sh
agt help # μ‚¬μš© κ°€λŠ₯ν•œ λͺ…λ Ήμ–΄ λͺ©λ‘ 좜λ ₯
agt list # μ˜€ν”ˆλœ 이슈 λͺ©λ‘ 쑰회
agt issue # μƒˆ 이슈 생성
agt branch # μ„ νƒν•œ 이슈 기반 브랜치 생성
agt pr # ν˜„μž¬ λΈŒλžœμΉ˜μ—μ„œ PR 생성
agt label # label 생성
```

### 2. 도움말
```sh
$ agt help

Usage: agt [options]

Commands:
help Show this help message
list Show open issues
issue Create a new issue
branch Create a branch from an issue
pr Create a pull request
label Create a new label

Examples:
agt help
agt list
agt issue
agt branch
agt pr
agt label
```

### 3. 이슈 λͺ©λ‘ 쑰회
ν˜„μž¬ μ €μž₯μ†Œμ˜ λͺ¨λ“  이슈λ₯Ό 번호 순으둜 μ •λ ¬ν•˜μ—¬ λ³΄μ—¬μ€λ‹ˆλ‹€.

```bash
$ agt list

=== πŸ“‹ Open Issues ===
{issue-number} {issue-title} {issue-label}
...
```

### 3. 이슈 생성
이슈 생성

```bash
$ agt issue

> πŸ“ Enter issue title: {issue-title}

πŸ“Œ Available Issue Templates:
1. bug_report.md
2. feature_request.md
3. question.md
> Select a template number or press Enter to skip: {issue-template-number}

// If issue template is not selected (When selected, input items are added based on the contents of the template.)
> πŸ“ Enter issue description: {issue-description}

> πŸ‘₯ Enter assignees (comma-separated, or press Enter to skip): {issue-assignees}
> πŸ‘₯ Assignee set to your account: {your-github-account} (skip)

=== πŸ“‹ Available Labels ===
[1] bug
[2] documentation
[3] duplicate
[4] enhancement
[5] good first issue
[6] help wanted
[7] invalid
[8] question
[9] wontfix
> 🏷 Select labels [1...9]: {issue-lables-number}
> 🏷️ Selected Labels: [{issue-labels-name}]

> πŸ“… Enter milestone (or press Enter to skip): {issue-milestone}

βœ… GitHub issue created successfully.
```

### 4. 브랜치 생성
이슈 번호λ₯Ό μž…λ ₯λ°›μ•„ ν•΄λ‹Ή 이슈의 제λͺ©μ„ 기반으둜 μƒˆλ‘œμš΄ 브랜치λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.
- 브랜치 λͺ…λͺ… κ·œμΉ™: `{branch-types(feature, bugfix, hotfix, release)}/{issue-number}-{issue-title}`

```bash
$ agt branch

=== πŸ“‹ Open Issues ===
{issue-number} {issue-title} {issue-label}
...
> πŸ”’ Enter issue number to create branch: {issue-number}

πŸ“Œ Select a branch type:
[1] feature - Develop new features
[2] bugfix - Fix bugs
[3] hotfix - Urgent fixes
[4] release - Prepare for a release
> πŸ”’ Enter the branch type number: {branch-type-number}

βœ… Branch '{branch-type}/{issue-number}-{issue-title}' created.
```

### 5. Pull Request 생성
ν˜„μž¬ λΈŒλžœμΉ˜μ—μ„œ PR을 μžλ™μœΌλ‘œ μƒμ„±ν•©λ‹ˆλ‹€.

```bash
$ agt pr

> πŸ“Œ Enter PR title: {pull-request-title}
> πŸ“Œ Provide a short summary of your changes: {pull-request-summary}

=== πŸ“‹ Open Issues ===

> πŸ” Enter the related issue number (e.g., #32): {pull-request-issue-number}

> ✨ Describe the major changes in your PR: {pull-request-changes}

> βœ… Have you tested the changes locally? (yes/no): {pull-request-tested}

> πŸ“ Does your code follow the project’s style guidelines? (yes/no): {pull-request-guidelines}

> πŸ“– Have you updated the documentation if necessary? (yes/no): {pull-request-documentation}

> πŸ”— Add any additional information (optional): {pull-request-additional}

> πŸ‘€ Enter reviewers (comma-separated, or press Enter to skip): {pull-request-reviewers}

> πŸ‘₯ Enter assignees (comma-separated, or press Enter to skip): {pull-request-assignees}
> πŸ‘₯ Assignee set to your account: {your-github-account}

=== πŸ“‹ Available Labels ===
[1] bug
[2] documentation
[3] duplicate
[4] enhancement
[5] good first issue
[6] help wanted
[7] invalid
[8] question
[9] wontfix
> 🏷 Select labels [1...9]: {issue-lables-number}
> 🏷️ Selected Labels: [{issue-labels-name}]

> πŸ“… Enter milestone (or press Enter to skip): {pull-request-milestone}

[1] HEAD -> origin/master
[2] development
[3] master
> 🌿 Select base branch: {base-branch-number}

πŸš€ Pushing branch {currentBranch} to remote repository...
πŸ”„ Creating a new pull request...
βœ… Pull request created successfully.
```

## 문제 ν•΄κ²°

### ❌ 일반적인 였λ₯˜

1. **Git μ €μž₯μ†Œκ°€ μ•„λ‹Œ 경우**
```
Error: Not a git repository. Please run 'git init' first.
```
➑️ ν•΄κ²°: `git init` λͺ…λ Ήμ–΄λ‘œ Git μ €μž₯μ†Œ μ΄ˆκΈ°ν™”

2. **GitHub CLI 인증 였λ₯˜**
```
Error: Please run 'gh auth login' to authenticate with GitHub.
```
➑️ ν•΄κ²°: `gh auth login` μ‹€ν–‰ν•˜μ—¬ 재인증

3. **μ†ŒμŠ€ λΈŒλžœμΉ˜κ°€ μ—†λŠ” 경우**
```
Error: Source branch '{branch-name}' does not exist
```
➑️ ν•΄κ²°: ν•΄λ‹Ήν•˜λŠ” λΈŒλžœμΉ˜κ°€ μ‘΄μž¬ν•˜λŠ”μ§€ 확인

## πŸ“„ λΌμ΄μ„ μŠ€
이 ν”„λ‘œμ νŠΈλŠ” MIT λΌμ΄μ„ μŠ€λ₯Ό λ”°λ¦…λ‹ˆλ‹€.