Skip to content

๐Ÿ› ๏ธ AGT โ€ Automatic Git & Github Tool

Taewon Kim edited this page Nov 6, 2024 · 5 revisions

AGT ์†Œ๊ฐœ

AGT(Automatic Git & GitHub Tool)๋Š” GitHub Issue๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋ธŒ๋žœ์น˜ ๊ด€๋ฆฌ์™€ ํ’€ ๋ฆฌํ€˜์ŠคํŠธ(PR) ์ƒ์„ฑ์„ ์ž๋™ํ™”ํ•˜์—ฌ ๊ฐœ๋ฐœ์ž์˜ ์ƒ์‚ฐ์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ณ , ๋ธŒ๋žœ์น˜ ๊ด€๋ฆฌ์˜ ์ผ๊ด€์„ฑ์„ ์œ ์ง€ํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

AGT ๊ฐœ๋ฐœ ๋ฐฐ๊ฒฝ

AGT ๊ฐœ๋ฐœ ๋ฐฐ๊ฒฝ ์ž์„ธํžˆ ๋ณด๊ธฐ

AGT๋ฅผ ๊ฐœ๋ฐœํ•˜๊ฒŒ ๋œ ๊ณ„๊ธฐ

ํ”„๋กœ์ ํŠธ์˜ ๋ธŒ๋žœ์น˜ ์ „๋žต์„ ํšจ์œจ์ ์œผ๋กœ ๊ด€๋ฆฌํ•˜๊ณ , ๋ฐ˜๋ณต์ ์ธ Git ๋ฐ GitHub ์ž‘์—…์„ ์ž๋™ํ™”ํ•˜๊ธฐ ์œ„ํ•ด AGT๋ฅผ ๊ฐœ๋ฐœํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ, ์ด์Šˆ ๊ธฐ๋ฐ˜ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ๊ณผ PR ์ƒ์„ฑ์„ ์ž๋™ํ™”ํ•จ์œผ๋กœ์จ ๊ฐœ๋ฐœ์ž์˜ ์ƒ์‚ฐ์„ฑ์„ ๋†’์ด๊ณ , ๋ธŒ๋žœ์น˜ ๊ด€๋ฆฌ์˜ ์ผ๊ด€์„ฑ์„ ์œ ์ง€ํ•˜๊ณ ์ž ํ–ˆ์Šต๋‹ˆ๋‹ค.

AGT ๊ฐœ๋ฐœ์„ ์œ„ํ•ด ํ•™์Šตํ•œ ๋‚ด์šฉ ์ •๋ฆฌ

AGT๋ฅผ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•ด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ธฐ์ˆ ๊ณผ ๋„๊ตฌ์— ๋Œ€ํ•ด ํ•™์Šตํ•˜์˜€์Šต๋‹ˆ๋‹ค:

Git

  • ๋ธŒ๋žœ์น˜ ๊ด€๋ฆฌ: Git์˜ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ, ์ „ํ™˜, ๋ณ‘ํ•ฉ ๋“ฑ์˜ ๊ธฐ๋ณธ์ ์ธ ๋ช…๋ น์–ด ์‚ฌ์šฉ๋ฒ•์„ ์ตํ˜”์Šต๋‹ˆ๋‹ค.
  • ๋ฆฌ๋ฒ ์ด์Šค ๋ฐ ๋จธ์ง€ ์ „๋žต: ๋ธŒ๋žœ์น˜ ์ „๋žต์— ๋งž๋Š” ์ ์ ˆํ•œ ๋ณ‘ํ•ฉ ๋ฐฉ๋ฒ•์„ ์„ ํƒํ•˜๊ณ  ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ํ•™์Šตํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์Šคํฌ๋ฆฝํŠธ ๋‚ด Git ๋ช…๋ น์–ด ํ™œ์šฉ: ์Šคํฌ๋ฆฝํŠธ์—์„œ Git ๋ช…๋ น์–ด๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์ž๋™ํ™”๋œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ตํ˜”์Šต๋‹ˆ๋‹ค.

GitHub CLI (gh)

  • ์„ค์น˜ ๋ฐ ์„ค์ •: GitHub CLI๋ฅผ ์„ค์น˜ํ•˜๊ณ  ์ธ์ฆํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ํ•™์Šตํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์ด์Šˆ ๊ด€๋ฆฌ: gh issue ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด์Šˆ ๋ชฉ๋ก ์กฐํšŒ, ์ด์Šˆ ์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ ๋“ฑ์˜ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • PR ๊ด€๋ฆฌ: gh pr ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PR ์ƒ์„ฑ, PR ์ƒํƒœ ํ™•์ธ ๋“ฑ์˜ ์ž‘์—…์„ ์ž๋™ํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • API ํ™œ์šฉ: gh api ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด GitHub API๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์ถ”๊ฐ€์ ์ธ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๊ฑฐ๋‚˜ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ตํ˜”์Šต๋‹ˆ๋‹ค.

GitHub Actions

  • ์›Œํฌํ”Œ๋กœ์šฐ ์ž‘์„ฑ: YAML ํŒŒ์ผ์„ ์ž‘์„ฑํ•˜์—ฌ ํŠน์ • ์ด๋ฒคํŠธ์— ๋Œ€ํ•œ ์ž๋™ํ™”๋œ ์ž‘์—…์„ ์ •์˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ํ•™์Šตํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์ด๋ฒคํŠธ ํŠธ๋ฆฌ๊ฑฐ: PR ๋จธ์ง€ ์‹œ ์ด์Šˆ๋ฅผ ์ž๋™์œผ๋กœ ํด๋กœ์ฆˆํ•˜๋Š” ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด pull_request_target ์ด๋ฒคํŠธ์™€ ์กฐ๊ฑด๋ฌธ์„ ํ™œ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ถŒํ•œ ์„ค์ •: ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ ํ•„์š”ํ•œ ๊ถŒํ•œ์„ ์„ค์ •ํ•˜์—ฌ ์•ˆ์ „ํ•˜๊ฒŒ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋น„๋ฐ€ ๊ด€๋ฆฌ: GITHUB_TOKEN๊ณผ ๊ฐ™์€ ์‹œํฌ๋ฆฟ์„ ํ™œ์šฉํ•˜์—ฌ ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ ์•ˆ์ „ํ•˜๊ฒŒ ์ธ์ฆ ์ •๋ณด๋ฅผ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์Šคํฌ๋ฆฝํŠธ ํ†ตํ•ฉ: ์›Œํฌํ”Œ๋กœ์šฐ ๋‚ด์—์„œ Bash ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ๋ณต์žกํ•œ ์ž‘์—…์„ ์ž๋™ํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.

GitHub Actions์˜ ์‚ฌ์šฉ์€ AGT ์Šคํฌ๋ฆฝํŠธ์™€ ํ†ตํ•ฉ๋˜์–ด ์ด์Šˆ์™€ PR ๊ฐ„์˜ ์ž๋™ ์—ฐ๊ฒฐ ๋ฐ ๊ด€๋ฆฌ๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ–ˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ, PR์ด ๋จธ์ง€๋  ๋•Œ ๊ด€๋ จ ์ด์Šˆ๋ฅผ ์ž๋™์œผ๋กœ ํด๋กœ์ฆˆํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด GitHub Actions๋ฅผ ํ™œ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.

๋ฐœ์ƒํ–ˆ๋˜ ๋ฌธ์ œ

AGT ๊ฐœ๋ฐœ ๊ณผ์ •์—์„œ ๋ช‡ ๊ฐ€์ง€ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค:

  • ์ด์Šˆ์™€ PR ์—ฐ๊ฒฐ ๋ฌธ์ œ: ์›น ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด์„œ๋Š” ์ด์Šˆ๋ฅผ PR์— ์‰ฝ๊ฒŒ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ์—ˆ์œผ๋‚˜, GitHub CLI(gh)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋™์ผํ•œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ ค๊ณ  ํ•  ๋•Œ ์–ด๋ ค์›€์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ, ์ž๋™์œผ๋กœ ์ด์Šˆ๋ฅผ ํด๋กœ์ฆˆํ•˜๋Š” ๊ธฐ๋Šฅ์„ CLI๋กœ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐ ํ•œ๊ณ„๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

  • ๋ชจ๋…ธ๋ ˆํฌ ์ œํ•œ: ํ”„๋กœ์ ํŠธ๊ฐ€ ๋ชจ๋…ธ๋ ˆํฌ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์–ด, ํŠน์ • ํ‚ค์›Œ๋“œ(์˜ˆ: Close)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด์Šˆ๋ฅผ ์ž๋™์œผ๋กœ ํด๋กœ์ฆˆํ•˜๋Š” ๊ฒƒ์ด ์–ด๋ ค์› ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ์—ฌ๋Ÿฌ ํŒจํ‚ค์ง€๊ฐ€ ํ•˜๋‚˜์˜ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— ํฌํ•จ๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, ํŠน์ • ํŒจํ‚ค์ง€์˜ ์ด์Šˆ๋ฅผ ํด๋กœ์ฆˆํ•˜๋Š” ๋ฐ ์ œ์•ฝ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

  • GitHub Actions ์˜์กด์„ฑ: ์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด, ๊ฒฐ๊ตญ GitHub Actions๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PR ๋จธ์ง€ ์‹œ ์ด์Šˆ๋ฅผ ์ž๋™์œผ๋กœ ํด๋กœ์ฆˆํ•˜๋Š” ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ž‘์„ฑํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ์Šคํฌ๋ฆฝํŠธ ๋‚ด์—์„œ ๋ชจ๋“  ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๋Š” ๋Œ€์‹ , GitHub Actions์˜ ์ž๋™ํ™” ๊ธฐ๋Šฅ์„ ํ™œ์šฉํ•˜์—ฌ ๋ฌธ์ œ๋ฅผ ์šฐํšŒํ•˜๋Š” ๋ฐฉ๋ฒ•์ด์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋“ค์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด AGT๋Š” GitHub Actions์™€์˜ ์—ฐ๋™์„ ๊ฐ•ํ™”ํ•˜์—ฌ, ๋ณด๋‹ค ์•ˆ์ •์ ์ด๊ณ  ์ž๋™ํ™”๋œ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ œ๊ณตํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“‹ ๋ชฉ์ฐจ

์‚ฌ์ „ ์ค€๋น„์‚ฌํ•ญ

  • Git์ด ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค
  • GitHub ๊ณ„์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค
  • ํ”„๋กœ์ ํŠธ์— dev-fe์™€ dev-be ๋ธŒ๋žœ์น˜๊ฐ€ ์กด์žฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค
  • .github/CODEOWNERS ํŒŒ์ผ์ด ์„ค์ •๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค
  • .github/pull_request_template.md ํŒŒ์ผ์ด ์„ค์ •๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค

์„ค์น˜ ๋ฐฉ๋ฒ•

๐ŸŽ MacOS

  1. GitHub CLI ์„ค์น˜

    # Homebrew๋ฅผ ํ†ตํ•œ ์„ค์น˜
    brew install gh
  2. GitHub ๊ณ„์ • ์—ฐ๋™

    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 ์Šคํฌ๋ฆฝํŠธ ์„ค์น˜

    # AGT ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์œ„ํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์ƒ์„ฑ
    mkdir -p ~/agt-tool
    
    # ์Šคํฌ๋ฆฝํŠธ ๋‹ค์šด๋กœ๋“œ ๋ฐ ์„ค์น˜
    curl -o ~/agt-tool/agt.sh https://raw.githubusercontent.com/boostcampwm-2024/web19-Clovapatra/refs/heads/main/.agt/agt.sh
    chmod +x ~/agt-tool/agt.sh
  4. ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •

    # .zshrc ํŒŒ์ผ์— ๋‹ค์Œ ๋‚ด์šฉ ์ถ”๊ฐ€
    echo 'export PATH="$PATH:$HOME/agt-tool"' >> ~/.zshrc
    echo 'alias agt="agt.sh"' >> ~/.zshrc
    
    # ์„ค์ • ์ ์šฉ
    source ~/.zshrc

๐ŸชŸ Windows

  1. GitHub CLI ์„ค์น˜

    a. ์›น ๋ธŒ๋ผ์šฐ์ €์—์„œ https://cli.github.com ์ ‘์†

    b. "Download for Windows" ๋ฒ„ํŠผ ํด๋ฆญ

    c. ๋‹ค์šด๋กœ๋“œ๋œ ์„ค์น˜ ํŒŒ์ผ(gh_x.x.x_windows_amd64.msi) ์‹คํ–‰

    d. ์„ค์น˜ ๋งˆ๋ฒ•์‚ฌ์˜ ์•ˆ๋‚ด์— ๋”ฐ๋ผ ์ง„ํ–‰:

    • "Next" ํด๋ฆญ
    • ์„ค์น˜ ๊ฒฝ๋กœ ํ™•์ธ ํ›„ "Next" ํด๋ฆญ
    • "Install" ํด๋ฆญ
    • ์„ค์น˜ ์™„๋ฃŒ ํ›„ "Finish" ํด๋ฆญ
  2. GitHub ๊ณ„์ • ์—ฐ๋™

    a. PowerShell ๋˜๋Š” ๋ช…๋ น ํ”„๋กฌํ”„ํŠธ๋ฅผ ๊ด€๋ฆฌ์ž ๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰

    b. ๋‹ค์Œ ๋ช…๋ น์–ด ์‹คํ–‰:

    gh auth login

    c. ํ”„๋กฌํ”„ํŠธ์— ๋”ฐ๋ผ ์ง„ํ–‰:

    1. ? What account do you want to log into? โ†’ GitHub.com ์„ ํƒ (๋ฐฉํ–ฅํ‚ค๋กœ ์ด๋™ ํ›„ Enter)
    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 ์Šคํฌ๋ฆฝํŠธ ์„ค์น˜

    a. PowerShell์„ ๊ด€๋ฆฌ์ž ๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰

    b. ๋‹ค์Œ ๋ช…๋ น์–ด๋“ค์„ ์ˆœ์„œ๋Œ€๋กœ ์‹คํ–‰:

    # AGT ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์œ„ํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์ƒ์„ฑ
    mkdir "$env:USERPROFILE\agt-tool"
    
    # ์Šคํฌ๋ฆฝํŠธ ๋‹ค์šด๋กœ๋“œ
    Invoke-WebRequest -Uri "https://raw.githubusercontent.com/boostcampwm-2024/web19-Clovapatra/refs/heads/main/.agt/agt.ps1" -OutFile "$env:USERPROFILE\agt-tool\agt.ps1"
    
    # agt.cmd ํŒŒ์ผ ์ƒ์„ฑ (PowerShell ์Šคํฌ๋ฆฝํŠธ๋ฅผ cmd ๋ช…๋ น์–ด๋กœ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ๋ž˜ํผ)
    @"
    @echo off
    powershell -ExecutionPolicy RemoteSigned -File "%USERPROFILE%\agt-tool\agt.ps1" %*
    "@ | Out-File -FilePath "$env:USERPROFILE\agt-tool\agt.cmd" -Encoding ascii
    
  4. ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •

    a. ์‹œ์Šคํ…œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ํŽธ์ง‘์ฐฝ ์—ด๊ธฐ:

    • Windows ํ‚ค + R ์„ ๋ˆŒ๋Ÿฌ ์‹คํ–‰ ์ฐฝ ์—ด๊ธฐ
    • "sysdm.cpl" ์ž…๋ ฅ ํ›„ ํ™•์ธ
    • "๊ณ ๊ธ‰" ํƒญ ์„ ํƒ
    • "ํ™˜๊ฒฝ ๋ณ€์ˆ˜" ๋ฒ„ํŠผ ํด๋ฆญ

    b. Path ํ™˜๊ฒฝ๋ณ€์ˆ˜ ํŽธ์ง‘:

    • "์‚ฌ์šฉ์ž ๋ณ€์ˆ˜" ์„น์…˜์—์„œ "Path" ์„ ํƒ
    • "ํŽธ์ง‘" ๋ฒ„ํŠผ ํด๋ฆญ
    • "์ƒˆ๋กœ ๋งŒ๋“ค๊ธฐ" ๋ฒ„ํŠผ ํด๋ฆญ
    • %USERPROFILE%\agt-tool ์ž…๋ ฅ
    • "ํ™•์ธ" ๋ฒ„ํŠผ ํด๋ฆญํ•˜์—ฌ ๋ชจ๋“  ์ฐฝ ๋‹ซ๊ธฐ

    c. PowerShell ์‹คํ–‰ ์ •์ฑ… ์„ค์ •:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  5. ์„ค์น˜ ํ™•์ธ

    a. ์ƒˆ๋กœ์šด ํ„ฐ๋ฏธ๋„ ์ฐฝ์„ ์—ด๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋กœ AGT๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์„ค์น˜๋˜์—ˆ๋Š”์ง€ ํ™•์ธ:

    agt --help

๋ช…๋ น์–ด

๐Ÿ” agt list

ํ˜„์žฌ ์ €์žฅ์†Œ์˜ ๋ชจ๋“  ์ด์Šˆ๋ฅผ ๋ฒˆํ˜ธ ์ˆœ์œผ๋กœ ์ •๋ ฌํ•˜์—ฌ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

$ agt list
=== Open Issues ===
#2   [BE] ์ƒˆ๋กœ์šด ๊ฒŒ์ž„๋ฐฉ์„ ์ƒ์„ฑํ•œ๋‹ค.
#4   [BE] ๊ฐœ์„ค๋œ ๊ฒŒ์ž„๋ฐฉ์˜ ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜จ๋‹ค.
#8   [FE] ๊ฒŒ์ž„๋ฐฉ ์ปดํฌ๋„ŒํŠธ ์ƒ์„ฑ
#9   [BE] ๋‹‰๋„ค์ž„์„ ์„ค์ •ํ•œ๋‹ค

๐ŸŒฟ agt branch

์ด์Šˆ ๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ ํ•ด๋‹น ์ด์Šˆ์˜ ์ œ๋ชฉ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ƒˆ๋กœ์šด ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

  • ๋ธŒ๋žœ์น˜ ๋ช…๋ช… ๊ทœ์น™: feature-{fe/be}-#{issue-number}
  • ์†Œ์Šค ๋ธŒ๋žœ์น˜:
    • FE ์ด์Šˆ: dev-fe
    • BE ์ด์Šˆ: dev-be
$ agt branch
=== Open Issues ===
#2   [BE] ์ƒˆ๋กœ์šด ๊ฒŒ์ž„๋ฐฉ์„ ์ƒ์„ฑํ•œ๋‹ค.
#4   [BE] ๊ฐœ์„ค๋œ ๊ฒŒ์ž„๋ฐฉ์˜ ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜จ๋‹ค.
#8   [FE] ๊ฒŒ์ž„๋ฐฉ ์ปดํฌ๋„ŒํŠธ ์ƒ์„ฑ
#9   [BE] ๋‹‰๋„ค์ž„์„ ์„ค์ •ํ•œ๋‹ค
Select issue number: 2
Creating and switching to branch: feature-be-#2 from dev-be
Successfully created and switched to branch: feature-be-#2

๐Ÿ”€ agt pr

ํ˜„์žฌ feature ๋ธŒ๋žœ์น˜์—์„œ PR์„ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

  • PR ์ œ๋ชฉ์€ ์ด์Šˆ ์ œ๋ชฉ๊ณผ ๋™์ผํ•˜๊ฒŒ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.
  • Reviewer๋Š” CODEOWNERS ํŒŒ์ผ์—์„œ ๋ณธ์ธ์„ ์ œ์™ธํ•œ ๋ชจ๋“  ์‚ฌ๋žŒ์œผ๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.
  • Assignees๋Š” ๋ณธ์ธ์œผ๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.
  • PR ํ…œํ”Œ๋ฆฟ์ด ์ž๋™์œผ๋กœ ์ ์šฉ๋˜๋ฉฐ ์ด์Šˆ ๋ฒˆํ˜ธ๊ฐ€ ์ž๋™ ์ž…๋ ฅ๋ฉ๋‹ˆ๋‹ค.
$ agt pr
Creating PR with title: [BE] ์ƒˆ๋กœ์šด ๊ฒŒ์ž„๋ฐฉ์„ ์ƒ์„ฑํ•œ๋‹ค.
Base branch: dev-be
Reviewers: @reviewer1,@reviewer2
Successfully created PR for issue #2

๋ฌธ์ œ ํ•ด๊ฒฐ

โŒ ์ผ๋ฐ˜์ ์ธ ์˜ค๋ฅ˜

  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: Issue title must start with [FE] or [BE]
    

    โžก๏ธ ํ•ด๊ฒฐ: ์ด์Šˆ ์ œ๋ชฉ ํ˜•์‹์„ [FE] ๋˜๋Š” [BE]๋กœ ์‹œ์ž‘ํ•˜๋„๋ก ์ˆ˜์ •

  4. ์†Œ์Šค ๋ธŒ๋žœ์น˜๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ

    Error: Source branch 'dev-fe' does not exist
    

    โžก๏ธ ํ•ด๊ฒฐ: ํ•ด๋‹นํ•˜๋Š” dev-fe ๋˜๋Š” dev-be ๋ธŒ๋žœ์น˜๊ฐ€ ์กด์žฌํ•˜๋Š”์ง€ ํ™•์ธ

  5. feature ๋ธŒ๋žœ์น˜๊ฐ€ ์•„๋‹Œ ๊ณณ์—์„œ PR ์ƒ์„ฑ ์‹œ๋„

    Error: Current branch is not a feature branch
    

    โžก๏ธ ํ•ด๊ฒฐ: feature-fe-#๋ฒˆํ˜ธ ๋˜๋Š” feature-be-#๋ฒˆํ˜ธ ํ˜•์‹์˜ ๋ธŒ๋žœ์น˜์—์„œ๋งŒ PR ์ƒ์„ฑ ๊ฐ€๋Šฅ

๐Ÿ”„ ๊ถŒํ•œ ๋ฌธ์ œ ํ•ด๊ฒฐ

MacOS

# ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰ ๊ถŒํ•œ ๋ถ€์—ฌ
chmod +x ~/agt-tool/agt.sh

Windows

# PowerShell ์‹คํ–‰ ์ •์ฑ… ๋ณ€๊ฒฝ
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

์•ˆ๋…•! ํด๋กœ๋ฐ”ํŒŒํŠธ๋ผ

ํŒ€ ๋ฌธํ™”

๐Ÿค Ground Rule

ํ˜‘์—… ๋ฐฉ์‹

๐Ÿ”’ Convention
๐ŸŒณ Git Branch ์ „๋žต

๊ฐœ๋ฐœ ๋ฌธ์„œ

๐Ÿ› ๏ธ AGT - Automatic Git & Github Tool
๐Ÿ“Š WebRTC Mesh โ€ ํŠธ๋ž˜ํ”ฝ ๊ณ„์‚ฐ
๐ŸŽข WebRTC Mesh - ํ—˜๋‚œํ•œ ์—ฌ์ •
๐Ÿ’ฌ WebRTC๋ฅผ ์•Œ์•„๋ณด์ž
๐Ÿ“ฎ SSE(Server Sent Events)
๐Ÿ“– SSE Pagination
โณ Socket ํ†ต์‹ ์—์„œ ๋น„๋™๊ธฐ ์ž‘์—… ์ˆœ์„œ ๋ณด์žฅ ๋ฐฉ๋ฒ•
๐Ÿ“ก Redis pub/sub๋ฅผ ํ™œ์šฉํ•œ SSE ์ ์šฉ๊ธฐ
๐Ÿ—๏ธ Naver Cloud Platform์„ ํ™œ์šฉํ•œ ๋ฐฐํฌ ์ „๋žต
โš”๏ธ๐Ÿš€ ๋ถ€ํ•˜ ํ…Œ์ŠคํŠธ: ๋‹จ์ผ ์ธ์Šคํ„ด์Šค VS NKS
๐Ÿšดโ€โ™€๏ธ Redis๋กœ ๊ฒŒ์ž„๋ฐฉ ๊ด€๋ฆฌ ์ตœ์ ํ™”: ํšจ์œจ์ ์ธ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ์™€ ์„ฑ๋Šฅ ๊ฐœ์„ 

ํšŒ์˜๋ก

๐Ÿ“† ํšŒ์˜๋ก ์บ˜๋ฆฐ๋”
๐Ÿ–ค ๋ฐ์ผ๋ฆฌ ์Šคํฌ๋Ÿผ ํ…œํ”Œ๋ฆฟ
๐Ÿ–ค ํšŒ๊ณ  ํ…œํ”Œ๋ฆฟ

๋ฉ˜ํ† ๋ง

0๏ธโƒฃ 0์ฃผ์ฐจ ๋ฉ˜ํ† ๋ง ์ผ์ง€
1๏ธโƒฃ 1์ฃผ์ฐจ ๋ฉ˜ํ† ๋ง ์ผ์ง€
2๏ธโƒฃ 2์ฃผ์ฐจ ๋ฉ˜ํ† ๋ง ์ผ์ง€
3๏ธโƒฃ 3์ฃผ์ฐจ ๋ฉ˜ํ† ๋ง ์ผ์ง€
4๏ธโƒฃ 4์ฃผ์ฐจ ๋ฉ˜ํ† ๋ง ์ผ์ง€

๋ฐœํ‘œ

0๏ธโƒฃ 0์ฃผ์ฐจ ๋ฐœํ‘œ
1๏ธโƒฃ 1์ฃผ์ฐจ ๋ฐœํ‘œ
2๏ธโƒฃ 2์ฃผ์ฐจ ๋ฐœํ‘œ
3๏ธโƒฃ 3์ฃผ์ฐจ ๋ฐœํ‘œ
4๏ธโƒฃ 4์ฃผ์ฐจ ๋ฐœํ‘œ
5๏ธโƒฃ ์ตœ์ข… ๋ฐœํ‘œ

Clone this wiki locally