Repository navigation
Expand file tree
/
Copy pathcommit-and-push.bat
More file actions
90 lines (78 loc) · 2.15 KB
/
Copy pathcommit-and-push.bat
File metadata and controls
90 lines (78 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
echo.
echo ============================================
echo Starting git operations...
echo ============================================
echo.
REM Check current branch
echo [1/6] Checking current branch...
git branch -v
if errorlevel 1 (
echo ERROR: Could not get branch info
exit /b 1
)
echo.
echo [2/6] Checking if branch exists...
git rev-parse --verify docs/api-key-integration-guide 2>nul
if errorlevel 1 (
echo Branch does not exist, creating...
git checkout -b docs/api-key-integration-guide
if errorlevel 1 (
echo ERROR: Could not create branch
exit /b 1
)
) else (
echo Branch exists, switching to it...
git checkout docs/api-key-integration-guide
if errorlevel 1 (
echo ERROR: Could not switch to branch
exit /b 1
)
)
echo.
echo [3/6] Staging files...
git add docs/api-keys-guide.md README.md
if errorlevel 1 (
echo ERROR: Could not stage files
exit /b 1
)
echo Files staged successfully
echo.
echo [4/6] Showing staged changes...
git diff --cached --stat
echo.
echo [5/6] Creating commit...
git commit -m "docs(integrations): add API key authentication guide
- Add comprehensive API key integration guide (docs/api-keys-guide.md)
- Covers full key lifecycle: create, use, rotate, revoke
- Documents all scopes and permissions with enforcement details
- Includes rate limiting configuration and headers
- Provides security best practices and code examples (Python, Node.js, cURL)
- Explains troubleshooting and incident response
- Update README to reflect API keys are production-ready
Closes #91"
if errorlevel 1 (
echo ERROR: Could not create commit
exit /b 1
)
echo Commit created successfully
echo.
echo [6/6] Pushing to remote...
git push -u origin docs/api-key-integration-guide
if errorlevel 1 (
echo ERROR: Could not push
exit /b 1
)
echo Push successful!
echo.
echo ============================================
echo All operations completed successfully!
echo ============================================
echo.
echo Showing final log:
git log -1 --oneline
echo.
echo Branch pushed to remote. PR ready to create.
pause