From 8d85d6b7b194af8360321f740eea4234e985c8a5 Mon Sep 17 00:00:00 2001 From: Srikanth Muppandam Date: Mon, 19 May 2025 14:28:03 +0530 Subject: [PATCH] ci: add commit-check workflow and update contributing guidelines - Introduced a new GitHub Actions workflow () that validates PR commit messages for: - Valid author name and email - Configured the workflow to comment directly on pull requests when violations are found - Updated CONTRIBUTING.md with new commit formatting rules, branch naming standards, and DCO requirements to help contributors adhere to best practices - Ensures all commits to mainline meet traceability and compliance standards Signed-off-by: Srikanth Muppandam --- .github/workflows/preflight-checkers.yml | 19 +++++++++++++++++++ CONTRIBUTING.md | 16 +++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/preflight-checkers.yml diff --git a/.github/workflows/preflight-checkers.yml b/.github/workflows/preflight-checkers.yml new file mode 100644 index 00000000..ef98c023 --- /dev/null +++ b/.github/workflows/preflight-checkers.yml @@ -0,0 +1,19 @@ +name: preflight-checkers +on: + pull_request: + branches: ["main"] + push: + branches: ["main"] + workflow_dispatch: + +jobs: + checker: + uses: qualcomm-linux/multi-checker-pipeline/.github/workflows/checker.yml@main + with: + repolinter: true # default: false + semgrep: true # default: false + copyright-license-detector: true # default: false + pr-check-emails: true # default: false + + secrets: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4136793d..0b76cae8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,15 +39,21 @@ Welcome! This repository contains hardware validation shell scripts for Qualcomm ## Commit and PR Guidelines +To ensure consistency and traceability across all contributions, all commits must follow these rules: - One logical change per commit -- Always add sign-off: - ```bash - git commit -s -m "Add test for Bluetooth functionality" - ``` - +- Clear commit message**: Descriptive and meaningful message (avoid "fix" or "update" alone). +- Author information**: Must include your full name and correct email. +- Sign-off**: Each commit must include a `Signed-off-by:` line. This indicates you agree to the Developer Certificate of Origin (DCO). +- Branch naming**: Use descriptive prefixes, e.g.: + - `fix/issue-description` + - `feature/component-name` + - `chore/cleanup-topic` +- Target branch**: Always open PRs against the `main` branch unless instructed otherwise. - Mention reviewers if needed and explain validation steps - PRs should be raised against `main` unless otherwise noted +Automated checks will validate all of the above in CI workflows. PRs with failing commit checks will not be merged. + ## License All contributions must include: