diff --git a/.github/labeler.yml b/.github/labeler.yml index bc8733f..94dc860 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -2,31 +2,97 @@ # Automatically labels pull requests based on file paths changed # https://github.com/actions/labeler -# Path-based labels +# ── Semantic labels (drive changelog categories) ────────────────────────────── + +feat: + - head-branch: ['^feat/', '^feature/', '^add/'] + +fix: + - head-branch: ['^fix/', '^bugfix/', '^hotfix/', '^patch/', '^security/', '^sec/'] + +breaking: + - head-branch: ['^breaking/', '^major/'] + +docs: + - head-branch: ['^docs/', '^doc/'] + - changed-files: + - any-glob-to-any-file: + - 'docs/**/*.md' + - 'README.md' + - 'CONTRIBUTING.md' + - 'AGENTS.md' + - '.github/copilot-instructions.md' + +chore: + - head-branch: ['^chore/'] + - changed-files: + - any-glob-to-any-file: + - '.github/workflows/**/*' + - '.github/actions/**/*' + - '.github/CODEOWNERS' + - '.github/ISSUE_TEMPLATE/**/*' + - '.github/PULL_REQUEST_TEMPLATE.md' + - '.github/CODE_OF_CONDUCT.md' + - '.github/SECURITY.md' + - '.github/SUPPORT.md' + - '.github/FUNDING.yml' + - '.github/labeler.yml' + - '.github/release.yml' + - '.github/DOCS_TEMPLATE/**/*' + - '.vscode/**/*' + - '.devcontainer/**/*' + - '*.build.ps1' + - 'GitVersion.yml' + - 'tests/**/*' + - '.gitignore' + +refactor: + - head-branch: ['^refactor/', '^refac/', '^cleanup/'] + +dependencies: + - changed-files: + - any-glob-to-any-file: + - 'requirements.psd1' + - '.github/dependabot.yml' + +# ── Visual signal labels (reviewer context, not in changelog) ───────────────── + +agents: + - changed-files: + - any-glob-to-any-file: + - 'AGENTS.md' + - '.github/copilot-instructions.md' + cmdlets: - changed-files: - any-glob-to-any-file: - 'src/**/*.ps1' - 'src/**/*.psd1' + - '!src/**/*.Tests.ps1' tests: - changed-files: - any-glob-to-any-file: - - 'tests/**/*.Tests.ps1' - 'src/**/*.Tests.ps1' + - 'tests/Integration/**/*' -docs: +lint: - changed-files: - any-glob-to-any-file: - - 'docs/**/*.md' - - '*.md' + - 'tests/PSScriptAnalyzer/**/*' + +security: + - changed-files: + - any-glob-to-any-file: + - 'tests/InjectionHunter/**/*' build: - changed-files: - any-glob-to-any-file: - '*.build.ps1' + - 'GitVersion.yml' -ci-cd: +ci: - changed-files: - any-glob-to-any-file: - '.github/workflows/**/*' @@ -34,7 +100,21 @@ ci-cd: github: - changed-files: - - any-glob-to-any-file: '.github/**/*' + - any-glob-to-any-file: + - '.github/CODEOWNERS' + - '.github/ISSUE_TEMPLATE/**/*' + - '.github/PULL_REQUEST_TEMPLATE.md' + - '.github/CODE_OF_CONDUCT.md' + - '.github/SECURITY.md' + - '.github/SUPPORT.md' + - '.github/FUNDING.yml' + - '.github/labeler.yml' + - '.github/release.yml' + +template: + - changed-files: + - any-glob-to-any-file: + - '.github/DOCS_TEMPLATE/**/*' vscode: - changed-files: @@ -43,43 +123,3 @@ vscode: devcontainer: - changed-files: - any-glob-to-any-file: '.devcontainer/**/*' - -dependencies: - - changed-files: - - any-glob-to-any-file: - - 'requirements.psd1' - - '.github/dependabot.yml' - -# Branch-based labels -breaking: - - head-branch: ['^breaking', 'breaking', 'major'] - -feature: - - head-branch: ['^feature', 'feature', 'enhancement', 'feat', 'add', 'minor'] - -bugfix: - - head-branch: ['^bugfix', 'bugfix', 'fix', 'patch', 'hotfix'] - - # Conventional Commit-based labels -conventional-commits: -- type: 'bugfix' - nouns: ['bugfix', 'fix', 'patch', 'hotfix'] - labels: ['bugfix'] -- type: 'feature' - nouns: ['feature', 'enhancement', 'feat', 'add', 'minor'] - labels: ['feature'] -- type: 'breaking' - nouns: ['breaking', 'major'] - labels: ['breaking'] -- type: 'docs' - nouns: ['document','documentation'] - labels: ['docs'] -- type: 'build' - nouns: ['build','rebuild'] - labels: ['build'] -- type: 'performance' - nouns: ['performance', 'optimize', 'optimization'] - labels: ['performance'] -- type: 'config' - nouns: ['config', 'conf', 'cofiguration', 'configure'] - labels: ['config'] \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml index db85131..5902e4f 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -7,32 +7,21 @@ changelog: - title: 💥 Breaking Changes labels: - breaking - - major - title: 🚀 Features labels: - - feature - - enhancement - - title: 🐛 Bugfixes + - feat + - title: 🐛 Bug Fixes labels: - - bugfix - fix - - title: ⚡ Performance Improvements + - title: ♻️ Refactoring labels: - - performance - - title: 🧑‍💻 Developer Experience - labels: - - vscode - - devcontainer - - title: 🧪 Tests - labels: - - tests - - title: 🛠️ Build and CI + - refactor + - title: 📚 Documentation labels: - - build - - ci-cd + - docs - title: 📦 Dependencies labels: - dependencies - - title: 📚 Documentation + - title: 🔧 Chore labels: - - docs \ No newline at end of file + - chore diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index c9ebc4c..3eb97bc 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -60,18 +60,25 @@ jobs: env: LABELS_JSON: | [ - {"name": "dependencies", "color": "ededed", "description": "Dependency updates"}, - {"name": "documentation", "color": "0075ca", "description": "Improvements or additions to documentation"}, - {"name": "tests", "color": "d876e3", "description": "Related to tests"}, - {"name": "devcontainer", "color": "0e8a16", "description": "Related to development container"}, - {"name": "vscode", "color": "1d76db", "description": "Related to Visual Studio Code settings"}, - {"name": "ci-cd", "color": "bfdadc", "description": "Related to GitHub Actions CI"}, - {"name": "build", "color": "5319e7", "description": "Build related changes"}, - {"name": "github", "color": "6e5494", "description": "GitHub configuration changes"}, - {"name": "breaking", "color": "ff0000", "description": "Breaking changes"}, - {"name": "feature", "color": "0e8a16", "description": "New feature or enhancement"}, - {"name": "bugfix", "color": "d73a4a", "description": "Bug fix"}, - {"name": "performance", "color": "5319e7", "description": "Performance improvements"} + {"name": "breaking", "color": "ff0000", "description": "Breaking change"}, + {"name": "chore", "color": "ededed", "description": "Maintenance, tooling, or housekeeping"}, + {"name": "dependencies", "color": "bfd4f2", "description": "Dependency updates"}, + {"name": "docs", "color": "0075ca", "description": "Documentation changes"}, + {"name": "feat", "color": "0e8a16", "description": "New feature or enhancement"}, + {"name": "fix", "color": "d73a4a", "description": "Bug fix"}, + {"name": "ignore", "color": "ededed", "description": "Exclude this PR from the release changelog"}, + {"name": "refactor", "color": "5319e7", "description": "Code refactoring without behavior change"}, + {"name": "agents", "color": "e4e669", "description": "AI agent guidelines changed"}, + {"name": "build", "color": "5319e7", "description": "Build script or versioning changed"}, + {"name": "ci", "color": "bfdadc", "description": "CI/CD workflows or actions changed"}, + {"name": "cmdlets", "color": "c5def5", "description": "Source functions changed"}, + {"name": "devcontainer", "color": "006b75", "description": "Dev container changed"}, + {"name": "github", "color": "6e5494", "description": "GitHub config files changed"}, + {"name": "lint", "color": "f9d0c4", "description": "PSScriptAnalyzer config changed"}, + {"name": "security", "color": "e36209", "description": "InjectionHunter config changed"}, + {"name": "template", "color": "f9d0c4", "description": "Bootstrap template files changed"}, + {"name": "tests", "color": "d876e3", "description": "Test files changed"}, + {"name": "vscode", "color": "1d76db", "description": "VS Code settings changed"} ] steps: