Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/test-issue-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "💬 Test"
description: "코드 테스트"
labels: ["test"]
body:
- type: textarea
attributes:
label: 📄 설명
description: 검증하고자 하는 코드 대한 설명을 작성해 주세요.
placeholder: 검증하고자 하는 코드와 검증 방식에 대해 최대한 자세히 작성해 주세요!
validations:
required: true
- type: textarea
attributes:
label: ✅ 작업할 내용
description: 할 일을 체크박스 형태로 작성해주세요.
placeholder: 최대한 세분화 해서 적어주세요!
validations:
required: true
- type: textarea
attributes:
label: 🙋🏻 참고 자료
description: 참고 자료가 있다면 작성해 주세요.
17 changes: 0 additions & 17 deletions .github/workflows/auto-branch.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/close-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Close Issue When PR Merged
on:
pull_request:
types: [closed]

jobs:
close_issue:
runs-on: ubuntu-latest
steps:
- name: Close linked issue
uses: peter-evans/close-issue@v2
with:
github_token: ${{ secrets.TOKEN }}
comment: "✅ PR이 머지되어 해당 이슈를 닫습니다."
68 changes: 68 additions & 0 deletions .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Create Issue Branch
on:
issues:
types: [assigned]
issue_comment:
types: [created]
pull_request:
types: [closed]

jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Debug Git repository
run: |
git remote -v
git branch
git status

- name: Determine Branch Name Based on Issue Labels
id: detect_branch
run: |
LABEL=$(echo '${{ toJSON(github.event.issue.labels) }}' | jq -r '.[0].name')
if [[ -z "$LABEL" || "$LABEL" == "null" ]]; then
LABEL="feature" # 기본값 설정
fi
BRANCH_NAME="${LABEL}/issue-${{ github.event.issue.number }}"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
echo "🔹 Detected branch name: $BRANCH_NAME"

- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
default-branch: dev
branch-name: "${{ env.BRANCH_NAME }}"
overwrite-existing: true

- name: Check if PR already exists
id: check_pr
run: |
if gh pr list --state open --base dev --head "${{ env.BRANCH_NAME }}" --repo ${{ github.repository }} | grep "${{ env.BRANCH_NAME }}"; then
echo "pr_exists=true" >> $GITHUB_ENV
else
echo "pr_exists=false" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Open Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: dev
branch: "${{ env.BRANCH_NAME }}"
title: "🚀 Pull Request #${{ github.event.issue.number }}"
body: |
🔥 **이슈 #${{ github.event.issue.number }}에 대한 PR 생성!** 🔥

- 이슈 링크: #${{ github.event.issue.number }}
delete-branch: false
allow-empty-commits: true
14 changes: 14 additions & 0 deletions .github/workflows/delete-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Delete Merged Branch
on:
pull_request:
types: [closed]

jobs:
delete_merged_branch:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Delete branch if merged
uses: github-actions/delete-merged-branch@v4
with:
github_token: ${{ secrets.TOKEN }}
Loading