Skip to content

Add linting check for commit messages #2935

Open
@gdemonet

Description

@gdemonet

Component: git

Why this is needed:

We have decided of a format for our Git commit messages (see our best practices), but it is not enforced yet.

What should be done:

We want to enforce this format through a linting check.

Implementation proposal (strongly recommended):

  • Add some GitHub Action to enforce this check on all PRs (something like:
# .github/workflows/commitlint.yml
---
name: "Lint Commit Messages"
"on":
  - "pull_request"jobs:
  commitlint:
    runs-on: "ubuntu-latest"
    steps:
      - uses: "actions/checkout@v2"
        with:
          fetch-depth: 0
      - uses: "wagoid/[email protected]"

credits to @NicolasT)

  • Add the exact same linter to Eve steps (as part of our lint stage), to make sure an Eve pre-merge run is self-sufficient

Test plan:

Invalid commit messages should never land in this repository anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:easySomething that requires less than a day to fixkind:debtTechnical debtkind:internalIssues specific to Scality org, not interesting for external contributorstopic:ciContinuous integration and build orchestration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions