Skip to content

Commit 7caf54b

Browse files
committed
docs: all
1 parent 29855fe commit 7caf54b

3 files changed

Lines changed: 30 additions & 8 deletions

File tree

docs/AUTHENTICATION.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,23 @@ github_token: ${{ secrets.PAT_TOKEN }}
8484
### Scenario 1: Simple Commit and Push
8585

8686
```yaml
87-
- uses: actions/checkout@v5
87+
- uses: actions/checkout@v6
88+
with:
89+
token: ${{ secrets.GITHUB_TOKEN }}
8890
8991
- uses: somaz94/go-git-commit-action@v1
9092
with:
9193
user_email: actions@github.com
9294
user_name: GitHub Actions
93-
# github_token not required for checkout@v5
95+
github_token: ${{ secrets.GITHUB_TOKEN }} # Required for checkout@v6
9496
```
9597

9698
<br/>
9799

98100
### Scenario 2: Tag Operations
99101

100102
```yaml
101-
- uses: actions/checkout@v5
103+
- uses: actions/checkout@v6
102104
with:
103105
token: ${{ secrets.PAT_TOKEN }} # PAT required for tags
104106
@@ -107,14 +109,17 @@ github_token: ${{ secrets.PAT_TOKEN }}
107109
user_email: actions@github.com
108110
user_name: GitHub Actions
109111
tag_name: v1.0.0
112+
github_token: ${{ secrets.PAT_TOKEN }}
110113
```
111114

112115
<br/>
113116

114117
### Scenario 3: Pull Request Creation
115118

116119
```yaml
117-
- uses: actions/checkout@v5
120+
- uses: actions/checkout@v6
121+
with:
122+
token: ${{ secrets.GITHUB_TOKEN }}
118123
119124
- uses: somaz94/go-git-commit-action@v1
120125
with:

docs/DEVELOPMENT.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ Guide for developers who want to contribute to or modify the Go Git Commit Actio
3737
│ │ ├── common.go
3838
│ │ ├── common_test.go
3939
│ │ ├── file_operations.go
40-
│ │ ├── pr.go
41-
│ │ └── tag.go
40+
│ │ ├── pr.go # PR orchestration
41+
│ │ ├── tag.go
42+
│ │ └── pr/ # PR modules
43+
│ │ ├── branch.go # Branch management
44+
│ │ ├── creation.go # PR creation & API
45+
│ │ └── diff.go # Change detection
4246
│ └── gitcmd/ # Git command builders
4347
│ ├── commands.go
4448
│ └── commands_test.go
@@ -241,9 +245,14 @@ This reduces image size and build time.
241245
- Interface for dependency injection
242246

243247
**internal/git**
244-
- Git operations (commit, PR, tag)
248+
- Git operations (commit, tag)
245249
- File operations
246-
- Branch management
250+
- PR orchestration
251+
252+
**internal/git/pr**
253+
- Branch management (`branch.go`)
254+
- PR creation and GitHub API (`creation.go`)
255+
- Change detection (`diff.go`)
247256

248257
**internal/gitcmd**
249258
- Git command building

docs/EXAMPLES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
branch: main
4848
repository_path: path/to/repo # Optional
4949
file_pattern: '*.md' # Example: commit only markdown files
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
5051
```
5152
5253
---
@@ -81,6 +82,7 @@ jobs:
8182
user_name: GitHub Actions
8283
tag_name: v1.0.0
8384
tag_message: Release version 1.0.0 # Optional for annotated tags
85+
github_token: ${{ secrets.PAT_TOKEN }}
8486
```
8587
8688
<br/>
@@ -109,6 +111,7 @@ jobs:
109111
user_name: GitHub Actions
110112
tag_name: v1.0.0
111113
delete_tag: true
114+
github_token: ${{ secrets.PAT_TOKEN }}
112115
```
113116
114117
<br/>
@@ -138,6 +141,7 @@ jobs:
138141
user_name: GitHub Actions
139142
tag_name: v1
140143
tag_reference: ${{ github.sha }}
144+
github_token: ${{ secrets.PAT_TOKEN }}
141145

142146
# Tag from another tag
143147
- name: Create Git Tag from Tag
@@ -147,6 +151,7 @@ jobs:
147151
user_name: GitHub Actions
148152
tag_name: latest
149153
tag_reference: v1.0.2
154+
github_token: ${{ secrets.PAT_TOKEN }}
150155

151156
# Tag from branch
152157
- name: Create Git Tag from Branch
@@ -156,6 +161,7 @@ jobs:
156161
user_name: GitHub Actions
157162
tag_name: stable
158163
tag_reference: main
164+
github_token: ${{ secrets.PAT_TOKEN }}
159165
```
160166
161167
---
@@ -307,6 +313,7 @@ Commit multiple file types:
307313
commit_message: "chore: update multiple file types"
308314
branch: main
309315
file_pattern: "docs/*.md src/*.go *.yaml"
316+
github_token: ${{ secrets.GITHUB_TOKEN }}
310317
```
311318
312319
<br/>
@@ -322,4 +329,5 @@ Commit multiple file types:
322329
branch: main
323330
repository_path: "."
324331
file_pattern: "config/*.yaml docs/*.md src/util/*.js"
332+
github_token: ${{ secrets.GITHUB_TOKEN }}
325333
```

0 commit comments

Comments
 (0)