diff --git a/.github/workflows/semantic-pr.yaml b/.github/workflows/semantic-pr.yaml new file mode 100644 index 000000000000..72a334a6fd4a --- /dev/null +++ b/.github/workflows/semantic-pr.yaml @@ -0,0 +1,85 @@ +name: "Lint PR title" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + BREAKING + + scopes: + vuln + misconf + secret + + image + fs + repo + sbom + server + + alpine + redhat + alma + rocky + mariner + oracle + debian + ubuntu + amazon + suse + photon + distroless + + ruby + php + python + nodejs + rust + dotnet + java + go + + os + lang + + kubernetes + dockerfile + terraform + cloudformation + + docker + podman + containerd + oci + + cli + flag + + helm + report + db + deps \ No newline at end of file diff --git a/docs/community/contribute/pr.md b/docs/community/contribute/pr.md index 0014160f0c48..514b375a204e 100644 --- a/docs/community/contribute/pr.md +++ b/docs/community/contribute/pr.md @@ -32,16 +32,81 @@ The `type` and `scope` should always be lowercase as shown below. - **test** for adding missing tests, refactoring tests; no production code change. - **build** for updating build configuration, development tools or other changes irrelevant to the user. - **chore** for updates that do not apply to the above, such as dependency updates. +- **ci** for changes to CI configuration files and scripts +- **revert** for revert to a previous commit -**Example `` values:** +**Allowed `` values:** + +checks: + +- vuln +- misconf +- secret + +mode: + +- image +- fs +- repo +- sbom +- server + +os: - alpine - redhat +- alma +- rocky +- mariner +- oracle +- debian +- ubuntu +- amazon +- suse +- photon +- distroless + +language: + - ruby +- php - python +- nodejs +- rust +- dotnet +- java +- go + +vuln: + +- os +- lang + +config: + +- kubernetes +- dockerfile - terraform +- cloudformation + +container + +- docker +- podman +- containerd +- oci + +cli: + +- cli +- flag + +others: + +- helm - report -- etc. +- db +- deps The `` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted.