Skip to content

Commit 76e4598

Browse files
committed
docs (git-tag/README.md): improve formatting and error guidance
Enhances documentation readability by adding spacing and explicit code block languages. Clarifies solutions for common validation and permission errors to aid troubleshooting.
1 parent db19fa7 commit 76e4598

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

git-tag/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ Full Git objects with metadata:
330330
### Validation Errors
331331

332332
The action validates:
333+
333334
- Tag name format (no spaces, no '..' sequences)
334335
- Email format for Git configuration
335336
- Boolean parameter values
@@ -413,12 +414,14 @@ target: ${{ env.DEPLOY_SHA }}
413414

414415
#### ❌ Permission Denied
415416

416-
```
417+
```txt
417418
Permission denied (publickey)
418419
```
419420

420421
**Solutions:**
422+
421423
1. Ensure `github-token` has write permissions:
424+
422425
```yaml
423426
permissions:
424427
contents: write
@@ -428,17 +431,20 @@ Permission denied (publickey)
428431

429432
#### ❌ Tag Already Exists
430433

431-
```
434+
```txt
432435
Error: Tag v1.0.0 already exists and fail-if-exists is true
433436
```
434437

435438
**Solutions:**
439+
436440
1. Use force mode:
441+
437442
```yaml
438443
force: 'true'
439444
```
440445

441446
2. Allow existing tags:
447+
442448
```yaml
443449
fail-if-exists: 'false'
444450
```
@@ -447,22 +453,24 @@ Error: Tag v1.0.0 already exists and fail-if-exists is true
447453

448454
#### ❌ Invalid Tag Name
449455

450-
```
456+
```txt
451457
Error: Tag name cannot contain spaces
452458
```
453459

454460
**Solutions:**
461+
455462
1. Remove spaces from tag names
456463
2. Use hyphens instead of spaces
457464
3. Validate tag names before passing to action
458465

459466
#### ❌ Target Not Found
460467

461-
```
468+
```txt
462469
Error: Target 'unknown-branch' not found
463470
```
464471

465472
**Solutions:**
473+
466474
1. Verify target branch/commit exists
467475
2. Use `HEAD` for current commit
468476
3. Fetch required branches before tagging
@@ -564,6 +572,7 @@ message: 'Production release v${{ env.VERSION }}'
564572
### Branch Protection
565573

566574
Consider tag protection in repository settings:
575+
567576
- Protect important tags from deletion
568577
- Require reviews for tag creation
569578
- Restrict tag creation to specific users/teams
@@ -585,6 +594,7 @@ This action is distributed under the same license as the repository.
585594
## Support
586595

587596
For issues related to:
597+
588598
- **Git operations:** Check [Git Documentation](https://git-scm.com/docs/git-tag)
589599
- **GitHub tokens:** Check [GitHub Token Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
590600
- **Action bugs:** Create an issue in this repository

0 commit comments

Comments
 (0)