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

[BUG] commit-msg hook does not accept standard "revert" message #936

Closed
1 task done
JoernBerkefeld opened this issue May 26, 2023 · 2 comments · Fixed by #937
Closed
1 task done

[BUG] commit-msg hook does not accept standard "revert" message #936

JoernBerkefeld opened this issue May 26, 2023 · 2 comments · Fixed by #937
Labels
bug Something isn't working e/IDE EPIC
Milestone

Comments

@JoernBerkefeld
Copy link
Contributor

JoernBerkefeld commented May 26, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image

Expected Behavior

messages starting on "Revert ..." should be accepted

Version

5.0.1

@JoernBerkefeld JoernBerkefeld added bug Something isn't working e/IDE EPIC labels May 26, 2023
@JoernBerkefeld JoernBerkefeld added this to the 5.0.3 milestone May 26, 2023
@JoernBerkefeld
Copy link
Contributor Author

likely solution:
.hustky/commit-msg:

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
INPUT_FILE=$1
START_LINE=`head -n1 $INPUT_FILE`
PATTERN="^(#[[:digit:]]|Merge|Revert)"

if ! [[ "$START_LINE" =~ $PATTERN ]] ; then
  echo "Bad commit message, see example: \"#431 commit message\", you provided: \"$START_LINE\""
  exit 1
fi

@JoernBerkefeld JoernBerkefeld modified the milestones: 5.0.3, 5.0.2 May 26, 2023
JoernBerkefeld added a commit that referenced this issue May 26, 2023
…s-not-accept-standard-revert-message

bugfix/#936: allow "Revert ..." commit messages
@github-actions
Copy link

Closed by #937.

@JoernBerkefeld JoernBerkefeld linked a pull request May 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working e/IDE EPIC
Projects
None yet
1 participant