Skip to content

Commit e411bc3

Browse files
authored
docs: restore plugin configuration examples (#185)
Restore example YAML files that were deleted in commit 0dcf712. Update documentation links to point to the doc website and add missing configuration options.
1 parent 9c7a60f commit e411bc3

9 files changed

Lines changed: 381 additions & 0 deletions

docs/examples/full-config.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Full Plugin Configuration Example
2+
# All plugins working together
3+
# See: https://sley.indaco.dev/reference/sley-yaml.html
4+
5+
path: .version
6+
7+
plugins:
8+
# Commit Parser (enabled by default)
9+
commit-parser: true
10+
11+
# Release Gate
12+
release-gate:
13+
enabled: true
14+
require-clean-worktree: true
15+
blocked-on-wip-commits: true
16+
require-ci-pass: false
17+
allowed-branches:
18+
- "main"
19+
- "release/*"
20+
blocked-branches:
21+
- "experimental/*"
22+
23+
# Version Validator
24+
version-validator:
25+
enabled: true
26+
rules:
27+
- type: pre-release-format
28+
pattern: "^(alpha|beta|rc)(\\.[0-9]+)?$"
29+
- type: major-version-max
30+
value: 10
31+
- type: max-prerelease-iterations
32+
value: 10
33+
- type: require-even-minor
34+
enabled: false
35+
- type: branch-constraint
36+
branch: "release/*"
37+
allowed: ["patch"]
38+
- type: branch-constraint
39+
branch: "main"
40+
allowed: ["minor", "patch"]
41+
42+
# Dependency Check
43+
dependency-check:
44+
enabled: true
45+
auto-sync: true
46+
files:
47+
- path: package.json
48+
field: version
49+
format: json
50+
- path: Chart.yaml
51+
field: version
52+
format: yaml
53+
- path: pyproject.toml
54+
field: tool.poetry.version
55+
format: toml
56+
- path: VERSION
57+
format: raw
58+
- path: src/version.go
59+
format: regex
60+
pattern: 'const Version = "(.*?)"'
61+
62+
# Changelog Parser
63+
changelog-parser:
64+
enabled: true
65+
path: CHANGELOG.md
66+
require-unreleased-section: true
67+
infer-bump-type: true
68+
priority: commits
69+
70+
# Changelog Generator
71+
changelog-generator:
72+
enabled: true
73+
mode: "both"
74+
format: "grouped"
75+
changes-dir: ".changes"
76+
changelog-path: "CHANGELOG.md"
77+
merge-after: "manual"
78+
repository:
79+
auto-detect: true
80+
use-default-icons: true
81+
exclude-patterns:
82+
- "^Merge"
83+
- "^WIP"
84+
- "^fixup!"
85+
- "^squash!"
86+
include-non-conventional: false
87+
contributors:
88+
enabled: true
89+
show-new-contributors: true
90+
91+
# Tag Manager
92+
tag-manager:
93+
enabled: true
94+
auto-create: true # Default is false; set to true for automatic tagging during bump
95+
prefix: v
96+
annotate: true
97+
push: false
98+
tag-prereleases: false # Set to true to also tag pre-releases
99+
sign: false
100+
signing-key: ""
101+
message-template: "Release {version}"
102+
103+
# Audit Log
104+
audit-log:
105+
enabled: true
106+
path: ".version-history.json"
107+
format: "json"
108+
include-author: true
109+
include-timestamp: true
110+
include-commit-sha: true
111+
include-branch: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Audit Log Plugin Example
2+
# See: https://sley.indaco.dev/plugins/audit-log.html
3+
4+
path: .version
5+
6+
plugins:
7+
audit-log:
8+
enabled: true
9+
path: ".version-history.json"
10+
format: "json" # or "yaml"
11+
include-author: true
12+
include-timestamp: true
13+
include-commit-sha: true
14+
include-branch: true
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog Generator Plugin Example
2+
# See: https://sley.indaco.dev/plugins/changelog-generator.html
3+
4+
path: .version
5+
6+
plugins:
7+
changelog-generator:
8+
enabled: true
9+
mode: "versioned" # "versioned", "unified", or "both"
10+
format: "grouped" # "grouped", "keepachangelog", "github", or "minimal"
11+
changes-dir: ".changes"
12+
changelog-path: "CHANGELOG.md"
13+
# merge-after controls when versioned changelog files are merged into CHANGELOG.md
14+
# - "manual" (default): No auto-merge, use 'sley changelog merge' command
15+
# - "immediate": Merge right after changelog generation
16+
# - "prompt": Interactive confirmation (auto-skips in CI/non-interactive environments)
17+
merge-after: "manual"
18+
# header-template: "path/to/header.tmpl" # Optional custom header template
19+
repository:
20+
auto-detect: true
21+
# provider: "github" # or "gitlab"
22+
# host: "github.com"
23+
# owner: "your-org"
24+
# repo: "your-repo"
25+
# Custom commit grouping rules (optional)
26+
# groups:
27+
# - pattern: "^feat"
28+
# label: "Features"
29+
# icon: "sparkles"
30+
use-default-icons: true
31+
# group-icons:
32+
# Features: "sparkles"
33+
# "Bug Fixes": "bug"
34+
# breaking-changes-icon: "warning"
35+
exclude-patterns:
36+
- "^Merge"
37+
- "^WIP"
38+
- "^fixup!"
39+
- "^squash!"
40+
include-non-conventional: false
41+
contributors:
42+
enabled: true
43+
# format: "{{.Name}}"
44+
# icon: "heart"
45+
show-new-contributors: true
46+
# new-contributors-format: "{{.Name}}"
47+
# new-contributors-icon: "tada"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Changelog Parser Plugin Example
2+
# See: https://sley.indaco.dev/plugins/changelog-parser.html
3+
4+
path: .version
5+
6+
plugins:
7+
changelog-parser:
8+
enabled: true
9+
path: "CHANGELOG.md"
10+
format: "auto" # keepachangelog, grouped, github, minimal, auto
11+
require-unreleased-section: true
12+
infer-bump-type: true
13+
priority: "changelog" # "changelog" or "commits"
14+
15+
# Commit parser as fallback when priority is "changelog"
16+
commit-parser: true
17+
18+
# ---
19+
# Format-specific examples:
20+
# ---
21+
22+
# Keep a Changelog (default):
23+
# plugins:
24+
# changelog-parser:
25+
# enabled: true
26+
# format: keepachangelog
27+
28+
# Grouped format with custom section mapping:
29+
# plugins:
30+
# changelog-parser:
31+
# enabled: true
32+
# format: grouped
33+
# grouped-section-map:
34+
# "New Features": "Added"
35+
# "Bug Fixes": "Fixed"
36+
# "Breaking": "Removed"
37+
38+
# GitHub format (limited inference - see docs):
39+
# plugins:
40+
# changelog-parser:
41+
# enabled: true
42+
# format: github
43+
44+
# Minimal format:
45+
# plugins:
46+
# changelog-parser:
47+
# enabled: true
48+
# format: minimal
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Commit Parser Plugin Example
2+
# See: https://sley.indaco.dev/plugins/commit-parser.html
3+
4+
path: .version
5+
6+
plugins:
7+
# Enabled by default - configure only to disable
8+
commit-parser: true
9+
10+
# To disable:
11+
# commit-parser: false
12+
13+
# ---
14+
# Integration with changelog-parser:
15+
# ---
16+
17+
# Use commit-parser as primary (recommended for CI/CD):
18+
# plugins:
19+
# commit-parser: true
20+
# changelog-parser:
21+
# enabled: true
22+
# format: auto
23+
# priority: "commits" # commit-parser takes precedence
24+
25+
# Use changelog-parser as primary, commit-parser as fallback:
26+
# plugins:
27+
# commit-parser: true
28+
# changelog-parser:
29+
# enabled: true
30+
# format: keepachangelog
31+
# priority: "changelog" # changelog-parser takes precedence
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Dependency Check Plugin Example
2+
# See: https://sley.indaco.dev/plugins/dependency-check.html
3+
4+
path: .version
5+
6+
plugins:
7+
dependency-check:
8+
enabled: true
9+
auto-sync: true
10+
files:
11+
# JSON
12+
- path: package.json
13+
field: version
14+
format: json
15+
16+
# YAML
17+
- path: Chart.yaml
18+
field: version
19+
format: yaml
20+
21+
# TOML (nested field)
22+
- path: pyproject.toml
23+
field: tool.poetry.version
24+
format: toml
25+
26+
# Raw (entire file is the version)
27+
- path: VERSION
28+
format: raw
29+
30+
# Regex (pattern with capturing group)
31+
- path: src/version.go
32+
format: regex
33+
pattern: 'const Version = "(.*?)"'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Release Gate Plugin Example
2+
# See: https://sley.indaco.dev/plugins/release-gate.html
3+
4+
path: .version
5+
6+
plugins:
7+
release-gate:
8+
enabled: true
9+
require-clean-worktree: true
10+
blocked-on-wip-commits: true
11+
require-ci-pass: false
12+
allowed-branches:
13+
- "main"
14+
- "release/*"
15+
- "hotfix/*"
16+
blocked-branches:
17+
- "experimental/*"
18+
- "wip/*"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Tag Manager Plugin Example
2+
# See: https://sley.indaco.dev/plugins/tag-manager.html
3+
4+
path: .version
5+
6+
plugins:
7+
tag-manager:
8+
enabled: true
9+
# Set to true for automatic tagging during bump
10+
# Default is false - use `sley tag create` for manual workflow
11+
auto-create: false
12+
prefix: "v"
13+
annotate: true
14+
push: false
15+
# Set to true to also create tags for pre-release versions
16+
tag-prereleases: false
17+
18+
# GPG Signing (optional)
19+
# Requires git to be configured with a GPG signing key
20+
sign: false
21+
signing-key: "" # Optional: specific GPG key ID (uses git default if empty)
22+
23+
# Custom Message Template (optional)
24+
# Available placeholders: {version}, {tag}, {prefix}, {date},
25+
# {major}, {minor}, {patch}, {prerelease}, {build}
26+
message-template: "Release {version}"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Version Validator Plugin Example
2+
# See: https://sley.indaco.dev/plugins/version-validator.html
3+
4+
path: .version
5+
6+
plugins:
7+
version-validator:
8+
enabled: true
9+
rules:
10+
# Pre-release format validation
11+
- type: "pre-release-format"
12+
pattern: "^(alpha|beta|rc)(\\.[0-9]+)?$"
13+
14+
# Version number limits
15+
- type: "major-version-max"
16+
value: 10
17+
18+
# - type: "minor-version-max"
19+
# value: 99
20+
21+
# - type: "patch-version-max"
22+
# value: 99
23+
24+
# Pre-release iteration limit (e.g., alpha.6 fails if max is 5)
25+
- type: "max-prerelease-iterations"
26+
value: 10
27+
28+
# Require pre-release for 0.x versions
29+
# - type: "require-pre-release-for-0x"
30+
# enabled: true
31+
32+
# Even minor version policy (stable releases must have even minor)
33+
- type: "require-even-minor"
34+
enabled: false # Set to true to enforce
35+
36+
# Disallow specific bump types
37+
# - type: "no-major-bump"
38+
# enabled: true
39+
40+
# - type: "no-minor-bump"
41+
# enabled: true
42+
43+
# - type: "no-patch-bump"
44+
# enabled: true
45+
46+
# Branch constraints
47+
- type: "branch-constraint"
48+
branch: "release/*"
49+
allowed: ["patch"]
50+
51+
- type: "branch-constraint"
52+
branch: "main"
53+
allowed: ["minor", "patch"]

0 commit comments

Comments
 (0)