You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/04/07 12:42:03 UTC

[GitHub] [incubator-inlong] lordcheng10 opened a new pull request, #3571: [INLONG-3167][git] Add a git hook to normalize commit messages

lordcheng10 opened a new pull request, #3571:
URL: https://github.com/apache/incubator-inlong/pull/3571

   ### Motivation
   fix issue: https://github.com/apache/incubator-inlong/issues/3167
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] lordcheng10 commented on pull request #3571: [INLONG-3167][git] Add a git hook to normalize commit messages

Posted by GitBox <gi...@apache.org>.
lordcheng10 commented on PR #3571:
URL: https://github.com/apache/incubator-inlong/pull/3571#issuecomment-1091689595

   @dockerzhang PTAL,thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] healchow merged pull request #3571: [INLONG-3167][InLong] Add a git hook to normalize commit messages

Posted by GitBox <gi...@apache.org>.
healchow merged PR #3571:
URL: https://github.com/apache/incubator-inlong/pull/3571


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] healchow commented on pull request #3571: [INLONG-3167][InLong] Add a git hook to normalize commit messages

Posted by GitBox <gi...@apache.org>.
healchow commented on PR #3571:
URL: https://github.com/apache/incubator-inlong/pull/3571#issuecomment-1092487982

   Its recommended to use:
   ```
   #!/bin/sh
   
   regular="^\[INLONG-[1-9][0-9]{3,4}\]\[(InLong|Agent|Audit|Dashboard|DataProxy|SDK|Sort|Sort-Flink|Sort-Standalone|TubeMQ|Manager|Website)\] [A-Z][a-zA-Z0-9.,-_ ]{10,100}"
   endRegular="[a-zA-Z0-9]$"
   
   error_msg="Your commit message was invalid, the format of the commit message is: [INLONG-1234][Module] Your message
       1. [INLONG-1234] represents the issue number associated with this commit
       2. [Module] indicates which module of Apache InLong this commit belongs to
          Support: InLong|Agent|Audit|Dashboard|DataProxy|SDK|Sort|Sort-Flink|Sort-Standalone|TubeMQ|Manager|Website
          If your commit involves multiple modules, please use [InLong] as the module
       3. After a space, write your commit message, start with a capital letter and cannot end with a number, space or punctuation
   For example:
       [INLONG-3293][Manager] Add version controller for stream source"
   
   commit_msg=$(head -n1 "$1")
   echo "$commit_msg"
   
   # shellcheck disable=SC2039
   if [[ ! $commit_msg =~ $regular || ! $commit_msg =~ $endRegular ]]; then
       echo "\033[31mCommit failed! $error_msg\033[31m" >&2
       exit 1
   else
       echo "\033[32mCommit success!\033[32m"
       exit 0
   fi
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] healchow commented on pull request #3571: [INLONG-3167][InLong] Add a git hook to normalize commit messages

Posted by GitBox <gi...@apache.org>.
healchow commented on PR #3571:
URL: https://github.com/apache/incubator-inlong/pull/3571#issuecomment-1091891912

   I will make a check on my local environment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org