mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
github/workflows/check.yml: Enhance checkpatch for breaking change labels
- Updated the check workflow to conditionally include a '-b' option for breaking change enforcement based on PR labels. - Modified the checkpatch script to support reading commit messages from stdin when using the '-m -g' flags. - Improved usage instructions to clarify the new stdin option for commit message checks. Signed-off-by: Arjav Patel <arjav1528@gmail.com>
This commit is contained in:
@@ -45,5 +45,9 @@ jobs:
|
||||
cd nuttx
|
||||
commits="${{ github.event.pull_request.base.sha }}..HEAD"
|
||||
git log --oneline $commits
|
||||
echo "../nuttx/tools/checkpatch.sh -c -u -m -g $commits"
|
||||
../nuttx/tools/checkpatch.sh -c -u -m -g $commits
|
||||
breaking_opts=""
|
||||
if echo '${{ toJSON(github.event.pull_request.labels) }}' | jq -e 'any(.[].name; test("breaking change"; "i"))' >/dev/null 2>&1; then
|
||||
breaking_opts="-b"
|
||||
fi
|
||||
echo "../nuttx/tools/checkpatch.sh -c -u -m -g $breaking_opts $commits"
|
||||
../nuttx/tools/checkpatch.sh -c -u -m -g $breaking_opts $commits
|
||||
|
||||
Reference in New Issue
Block a user