Skip to content

Commit 4729ee8

Browse files
committed
Init Project
1 parent bf8d139 commit 4729ee8

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/auto-branch.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ jobs:
1010
permissions:
1111
contents: write
1212

13-
steps:
14-
- name: Checkout repository
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
19-
- name: Set up Git
20-
run: |
21-
git config --global user.name "github-actions[bot]"
22-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
23-
24-
- name: Create branch from issue
25-
run: |
26-
issue_number=${{ github.event.issue.number }}
27-
issue_title=${{ github.event.issue.title }}
28-
29-
safe_title=$(echo "$issue_title" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd '[:alnum:]-')
30-
branch_name="issue/${issue_number}-${safe_title}"
31-
echo "📌 Creating branch: $branch_name from origin/main"
32-
33-
git fetch origin main
34-
git checkout -b "$branch_name" origin/main
35-
git push origin "$branch_name"
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Git
20+
run: |
21+
git config --global user.name "github-actions[bot]"
22+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
23+
24+
- name: Create branch from issue
25+
run: |
26+
issue_number=${{ github.event.issue.number }}
27+
issue_title=${{ github.event.issue.title }}
28+
29+
safe_title=$(echo "$issue_title" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd '[:alnum:]-')
30+
branch_name="issue/${issue_number}-${safe_title}"
31+
echo "📌 Creating branch: $branch_name from origin/main"
32+
33+
git fetch origin main
34+
git checkout -b "$branch_name" origin/main
35+
git push origin "$branch_name"

0 commit comments

Comments
 (0)