Skip to content

Commit ed3cae7

Browse files
authored
chore: add CI pipeline, governance docs, and code quality standards
- feat(ci): add GitHub Actions CI workflow (ShellCheck + BATS on push/PR) - feat(github): add issue templates, PR template, CODEOWNERS - feat(github): add dependabot.yml (monthly Actions updates) and FUNDING.yml - docs: add CONTRIBUTING.md with script style guide and test requirements - docs: add SECURITY.md with vulnerability reporting policy - docs: add CODE_OF_CONDUCT.md (Contributor Covenant v2.1) - docs: add CHANGELOG.md (Keep a Changelog format, v1.0–1.2 history) - chore: add .shellcheckrc, .gitignore, .editorconfig - chore: add Makefile (test/lint/install/clean/help targets) - chore: add .pre-commit-config.yaml (shellcheck-py + pre-commit-hooks) - fix(demo): update stale category counts to match current 59-script state - feat(readme): add CI status badge
1 parent aa8f892 commit ed3cae7

18 files changed

Lines changed: 761 additions & 6 deletions

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.sh]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.bats]
14+
indent_style = space
15+
indent_size = 4
16+
17+
[*.md]
18+
indent_style = space
19+
indent_size = 2
20+
trim_trailing_whitespace = false
21+
22+
[*.yml]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[Makefile]
27+
indent_style = tab

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# All files — auto-assign to repo owner
2+
* @wesleyscholl

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [wesleyscholl]
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug Report
3+
about: Report a problem with one of the scripts
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: wesleyscholl
7+
---
8+
9+
## Script Name
10+
11+
Which script is affected? (e.g., `scripts/health-check.sh`)
12+
13+
## Environment
14+
15+
- **OS**: (e.g., Ubuntu 22.04, macOS 14.2)
16+
- **Bash version**: (`bash --version`)
17+
- **Shell**: (e.g., bash, zsh)
18+
19+
## Steps to Reproduce
20+
21+
1.
22+
2.
23+
3.
24+
25+
## Expected Behavior
26+
27+
Describe what you expected to happen.
28+
29+
## Actual Behavior
30+
31+
Describe what actually happened. Paste any error output below:
32+
33+
```
34+
<error output here>
35+
```
36+
37+
## Additional Context
38+
39+
Any other context, configuration, or screenshots that may help diagnose the issue.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new script or enhancement to an existing one
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: wesleyscholl
7+
---
8+
9+
## Use Case
10+
11+
Describe the problem or workflow gap this feature would address.
12+
13+
## Proposed Solution
14+
15+
Describe the script or enhancement you'd like to see. What should it do, what flags should it accept, and what should it output?
16+
17+
## Alternatives Considered
18+
19+
List any alternative approaches or existing scripts you considered.
20+
21+
## Additional Context
22+
23+
Any references, related tools, or examples that might help implement this feature.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Description
2+
3+
Briefly describe what this PR adds or changes and why.
4+
5+
Fixes # (issue number, if applicable)
6+
7+
## Type of Change
8+
9+
- [ ] New script
10+
- [ ] Bug fix (existing script)
11+
- [ ] Enhancement (existing script)
12+
- [ ] Documentation update
13+
- [ ] CI / tooling change
14+
15+
## Checklist
16+
17+
- [ ] Script follows the style guide (`set -euo pipefail`, `show_usage()`, `--help` flag, input validation)
18+
- [ ] Script is executable (`chmod 755`)
19+
- [ ] A corresponding `.bats` test file is included or updated
20+
- [ ] All tests pass locally (`make test` or `bats tests/<script-name>.bats`)
21+
- [ ] ShellCheck passes locally (`make lint` or `shellcheck scripts/<script-name>.sh`)
22+
- [ ] `README.md` updated with the new script details and usage example
23+
- [ ] `CHANGELOG.md` updated under `[Unreleased]`
24+
25+
## Testing
26+
27+
Describe how you tested this change. Include the test commands you ran and their output where relevant.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
labels:
8+
- "dependencies"
9+
commit-message:
10+
prefix: "chore(deps)"

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
shellcheck:
14+
name: ShellCheck Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install ShellCheck
21+
run: sudo apt-get update -q && sudo apt-get install -y shellcheck
22+
23+
- name: Lint all scripts
24+
run: |
25+
echo "Running ShellCheck on all scripts..."
26+
find scripts/ -name "*.sh" -type f | sort | xargs shellcheck
27+
28+
test:
29+
name: BATS Test Suite
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Install dependencies
36+
run: |
37+
sudo apt-get update -q
38+
sudo apt-get install -y bats curl jq openssl
39+
40+
- name: Run full test suite
41+
run: bats tests/*.bats
42+
43+
- name: Upload test results
44+
if: always()
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: test-results
48+
path: test-results/
49+
if-no-files-found: ignore

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# macOS artifacts
2+
.DS_Store
3+
.DS_Store?
4+
._*
5+
.Spotlight-V100
6+
.Trashes
7+
8+
# Editor artifacts
9+
*.swp
10+
*.swo
11+
*~
12+
.vscode/
13+
.idea/
14+
*.iml
15+
16+
# Log files
17+
*.log
18+
logs/
19+
20+
# Test output
21+
test-results/
22+
coverage/
23+
/tmp/bats_test_*
24+
25+
# Credentials and secrets — never commit these
26+
*.pem
27+
*.key
28+
*.p12
29+
*.pfx
30+
.env
31+
.env.*
32+
!.env.example
33+
34+
# OS temp files
35+
Thumbs.db
36+
ehthumbs.db
37+
Desktop.ini

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/shellcheck-py/shellcheck-py
3+
rev: v0.10.0.1
4+
hooks:
5+
- id: shellcheck
6+
args: [--severity=error]
7+
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v5.0.0
10+
hooks:
11+
- id: trailing-whitespace
12+
exclude: \.md$
13+
- id: end-of-file-fixer
14+
- id: check-yaml
15+
- id: check-added-large-files
16+
args: [--maxkb=500]
17+
- id: check-executables-have-shebangs
18+
- id: check-shebang-scripts-are-executable

0 commit comments

Comments
 (0)