Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint): improve commit-linting #12200

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

legobeat
Copy link
Contributor

Description

  • Add lint:commits package script for independent commit linting
  • Make check-commit-message.sh more dynamic
    • Allow passing explicit commit message via env var LINT_COMMIT_MSG
    • Allow passing commit(s) to lint via env var LINT_COMMITS
    • Defaults to current behavior
  • docs: Suggest commit-lint hook to use check-commit-message.sh to simplify and avoid future drift

Related Issue

Screenshots:

n/a

Copy link

socket-security bot commented Apr 29, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@legobeat legobeat force-pushed the lint-commits branch 4 times, most recently from 9e9b052 to cd59830 Compare May 2, 2024 09:43
@komret komret self-assigned this Oct 9, 2024
Copy link
Contributor

@komret komret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @legobeat, sorry, we overlooked this PR, perhaps because it is marked as draft. Looks like a good improvement, but there are some shortcomings. Do you want to get back to it, or should I take it over?

Some issues I noticed:

The git hook does not log the commit hash and message when it fails:
Screenshot 2024-10-09 at 21 35 17

The system dialog window cannot read the colour when using the git hook which results in some gibberish, perhaps the colour can be applied differently or dropped entirely:
Screenshot 2024-10-09 at 21 35 27

The git hook blocks fixup commits:
Screenshot 2024-10-09 at 21 35 02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🗒 Draft
Development

Successfully merging this pull request may close these issues.

2 participants