Skip to content

Commit

Permalink
ci: add semantic pull requests check (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen authored Apr 12, 2022
1 parent 72d94b2 commit 94a5a18
Show file tree
Hide file tree
Showing 2 changed files with 152 additions and 2 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/semantic-pr.yaml
Original file line number Diff line number Diff line change
@@ -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
69 changes: 67 additions & 2 deletions docs/community/contribute/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<scope>` values:**
**Allowed `<scope>` 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 `<scope>` 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.

Expand Down

0 comments on commit 94a5a18

Please sign in to comment.