Skip to content

Commit

Permalink
chore: enable commitlint
Browse files Browse the repository at this point in the history
as we rely on structured commit messages for release notes, commitlint will validate the
commit messages.
  • Loading branch information
bavarianbidi committed Sep 15, 2023
1 parent c7d06c8 commit a35bf35
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 5 deletions.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Bug Report
description: Report a bug encountered while using garm operator
body:
- type: textarea
id: problem
attributes:
label: What steps did you take and what happened?
description: |
Please provide as much info as possible about the problem.
placeholder: "A clear and concise description on how to REPRODUCE the bug."
validations:
required: true

- type: textarea
id: expected
attributes:
label: What did you expect to happen?
validations:
required: true

- type: textarea
id: garmVersion
attributes:
label: garm version
placeholder: "The version of garm used in your environment"
validations:
required: true

- type: textarea
id: garmOperatorVersion
attributes:
label: garm-operator version
placeholder: "The version of garm-operator used in your environment."
validations:
required: true

- type: textarea
id: kubeVersion
attributes:
label: Kubernetes version
placeholder: "$kubectl version"
validations:
required: true

- type: textarea
id: additional
attributes:
label: Anything else you would like to add?
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ jobs:

- name: make test
run: make test

- name: Install commitlint
run: |
npm install conventional-changelog-conventionalcommits
npm install commitlint@latest
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: MIT
* @bavarianbidi @maigl
1 change: 1 addition & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
| Mario Constanti | <[email protected]> | [bavarianbidi](https://github.com/bavarianbidi) | Mercedes-Benz Tech Innovation GmbH, [imprint](https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md) | 2023-07-27 |
| Michael Kuhnt | <[email protected]> | [maigl](https://github.com/maigl) | Mercedes-Benz Tech Innovation GmbH, [imprint](https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md) | 2023-07-27 |

> Please note to also update the [`CODEOWNERS`](CODEOWNERS) file.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ $(GOLANGCI_LINT): $(LOCALBIN)
.PHONY: mockgen
mockgen: $(MOCKGEN) ## Download mockgen locally if necessary. If wrong version is installed, it will be overwritten.
$(MOCKGEN): $(LOCALBIN)
test -s $(LOCALBIN)/golangci-lint && $(LOCALBIN)/golangci-lint --version | grep -q $(MOCKGEN_VERSION) || \
test -s $(LOCALBIN)/mockgen && $(LOCALBIN)/mockget --version | grep -q $(MOCKGEN_VERSION) || \
GOBIN=$(LOCALBIN) go install go.uber.org/mock/mockgen@$(MOCKGEN_VERSION)

.PHONY: goreleaser
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ We are releasing the `garm-operator` as container image together with the corres
This manifests can be used to deploy the `garm-operator` into your Kubernetes cluster.

```bash
GARM_OPERATOR_VERSIOn=<garm-operator-version>
GARM_SERVER_URL=<garm-server-url>
GARM_SERVER_USERNAME=<garm-server-username>
GARM_SERVER_PASSWORD=<garm-server-password>
export GARM_OPERATOR_VERSIOn=<garm-operator-version>
export GARM_SERVER_URL=<garm-server-url>
export GARM_SERVER_USERNAME=<garm-server-username>
export GARM_SERVER_PASSWORD=<garm-server-password>
curl -L https://github.com/mercedes-benz/garm-operator/releases/download/${GARM_OPERATOR_VERSION}/garm-operator-all.yaml | envsubst | kubectl apply -f -
```

Expand Down

0 comments on commit a35bf35

Please sign in to comment.