Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Empty file added counter.txt
Empty file.
32 changes: 32 additions & 0 deletions test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off
setlocal enabledelayedexpansion

cd /d C:\Users\29084\Desktop\github101

set "counter_file=counter.txt"
set "output_file=test.txt"

if exist %counter_file% (
set /p n=<%counter_file%
) else (
set n=1
)

git checkout main
git pull origin main

set "branch=feat/test-%n%"
git checkout -b %branch%

echo test%n%>>%output_file%

git add .
git commit -m "feat: add test%n%"

git push -u origin %branch%
gh pr create --base main --head %branch% --title "feat: add test%n%" --body "Auto PR %n%"

set /a next=n+1
echo %next%>%counter_file%

echo Done: PR created for test%n%
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test