Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- main

jobs:
docs:
uses: nullplatform/actions-nullplatform/.github/workflows/tf-docs.yml@main
conventional-commit:
needs: docs
branch-name:
uses: nullplatform/actions-nullplatform/.github/workflows/branch-validation.yml@main

commitlint:
uses: nullplatform/actions-nullplatform/.github/workflows/conventional-commit.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ on:
- main

jobs:
quality:
validate:
uses: nullplatform/actions-nullplatform/.github/workflows/tofu-lint.yml@main
5 changes: 3 additions & 2 deletions .github/workflows/readme-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ concurrency:

jobs:
generate-readme:
uses: nullplatform/actions-nullplatform-terraform/.github/workflows/readme-ai.yml@main
uses: nullplatform/actions-nullplatform/.github/workflows/readme-ai-v2.yml@main
permissions:
contents: write
models: read
with:
modules_base_dir: '.'
base_dir: '.'
generate_all: false
ai_provider: 'openai'
ai_model: 'gpt-4o'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: nullplatform/actions-nullplatform/.github/workflows/release.yml@main
permissions:
contents: write
pull-requests: write
pull-requests: write
3 changes: 2 additions & 1 deletion .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:

jobs:
tfsec:
uses: nullplatform/actions-nullplatform-terraform/.github/workflows/tfsec.yml@main
uses: nullplatform/actions-nullplatform/.github/workflows/tfsec.yml@main
continue-on-error: true
permissions:
contents: read
pull-requests: write
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

# Validate branch name
BRANCH=$(git rev-parse --abbrev-ref HEAD)
PATTERN="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/.+$"
PATTERN="^(feat|feature|fix|docs|style|refactor|perf|test|build|ci|chore|revert)/.+$"

if [ "$BRANCH" != "main" ] && ! echo "$BRANCH" | grep -Eq "$PATTERN"; then
echo "Invalid branch name: $BRANCH"
echo ""
echo "Branch name must follow the pattern: type/description"
echo " Examples: feat/add-login, fix/bug-123, docs/readme"
echo ""
echo "Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
echo "Valid types: feat, feature, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
exit 1
fi
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ all projects.
│ └── users/ # User management
├── .github/
│ └── workflows/ # CI/CD workflows
├── .pre-commit-config.yaml
├── commitlint.config.js
│ └── workflows/ # CI/CD workflows, validations, etc.
├── .pre-commit-config.yaml # Pre-commit hooks configuration
├── .gitignore
└── README.md
```
Expand Down Expand Up @@ -385,25 +384,44 @@ These ensure code consistency and prevent configuration drift.

If you want to add or modify a module:

1. Create a `feature/` or `fix/` branch.
1. Create a branch following the naming convention (see below).
2. Add tests or validations if applicable.
3. Update the module's documentation.
4. Open a Pull Request for review.

### Branch naming convention

Branches must follow the pattern: `type/description`

**Valid types:** `feat`, `feature`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`

**Examples:**

```bash
feat/add-eks-module
feature/new-vpc-support
fix/resolve-iam-permissions
docs/update-readme
ci/add-validation-workflow
```

### Commit message format

This repository uses [Conventional Commits](https://www.conventionalcommits.org/) to ensure consistent commit messages. A pre-commit hook validates all commit messages automatically.
This repository uses [Conventional Commits](https://www.conventionalcommits.org/) to ensure consistent commit messages. CI validates all commit messages automatically.

**Valid types:** `feat`, `feature`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`

**Valid commit examples:**

```bash
feat: add new EKS module
feat(aws): add support for multiple availability zones
feature(aws): add support for multiple availability zones
fix: resolve VPC peering connection issue
fix(azure): correct DNS zone configuration
docs: update README with usage examples
refactor: simplify IAM role creation
chore: update provider versions
ci: add security scanning workflow
```

**Invalid commit examples:**
Expand All @@ -414,7 +432,7 @@ Fix bug # ❌ type must be lowercase
feat add login # ❌ missing colon after type
```

**Setup pre-commit hooks:**
**Setup pre-commit hooks (optional):**

```bash
# Install pre-commit (if not already installed)
Expand Down
7 changes: 6 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', ['feat', 'feature', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert']],
},
};
2 changes: 1 addition & 1 deletion nullplatform/code_repository/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
nullplatform = {
source = "nullplatform/nullplatform"
version = ">= 0.0.67"
version = "~> 0.0.67"
}
}
}
Expand Down