-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Apply suggestions from code review
- Loading branch information
Showing
66 changed files
with
1,646 additions
and
14,313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
name: Conventional Commits | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
conventional-commits: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install commitlint | ||
run: npm install -g @commitlint/cli | ||
- name: Validate commit messages | ||
id: conventional-commits | ||
env: | ||
SHA_FROM: ${{ github.event.pull_request.base.sha }} | ||
SHA_TO: ${{ github.event.pull_request.head.sha }} | ||
run: | | ||
delim="_EOF_$(uuidgen)" | ||
echo "validation-result<<$delim" >> "$GITHUB_OUTPUT" | ||
r=0 | ||
commitlint --from "$SHA_FROM" --to "$SHA_TO" >> "$GITHUB_OUTPUT" 2>&1 || r=$? | ||
echo "$delim" >> "$GITHUB_OUTPUT" | ||
exit $r | ||
- name: Post comment if validation failed | ||
if: always() && steps.conventional-commits.outcome == 'failure' | ||
uses: actions/github-script@v6 | ||
env: | ||
TEXT: |- | ||
The pull request does not conform to the conventional commit specification. Please ensure that your commit messages follow the spec: <https://www.conventionalcommits.org/>. | ||
We also strongly recommend that you set up your development environment with pre-commit, as described in our [CONTRIBUTING guidelines](https://github.com/DSD-DBS/capella-ros-tools/blob/master/CONTRIBUTING.md). This will run all the important checks right before you commit your changes, and avoids lengthy CI wait time and round trips. | ||
This is the commit validation log: | ||
``` | ||
${{ steps.conventional-commits.outputs.validation-result }} | ||
``` | ||
Here are some examples of valid commit messages: | ||
``` | ||
build: Bump dependency versions | ||
docs(user): Add model creation workflow | ||
feat: Add a monitoring dashboard | ||
``` | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: process.env.TEXT | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.