From a17d3b769a91752c0b38eb4122ea5b8032cf2c57 Mon Sep 17 00:00:00 2001 From: Rob Nester Date: Tue, 10 Oct 2023 13:31:45 -0400 Subject: [PATCH] ADD support for all GitHub PR keywords This commit ensures support for all keywords used in GitHub pull requests. The list of words can be viewed at [1] Resolves: EC-185 [1] https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests Signed-off-by: Rob Nester --- commit-msg/check-commit-message | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit-msg/check-commit-message b/commit-msg/check-commit-message index 028c50d..0145215 100755 --- a/commit-msg/check-commit-message +++ b/commit-msg/check-commit-message @@ -12,7 +12,7 @@ fi # The regex pattern # The (?i) is for case-insensitive matching # The \s* at the end is for optional trailing whitespace -pattern='^(?i)(ref|refs|reference|references|res|resolve|resolves)\s*:\s*((#|gh-)\d+|[A-Za-z]+-\d+)\s*$' +pattern='^(?i)(ref|refs|reference|references|res|resolve|resolves|resolved|close|closes|closed|fix|fixes|fixed)\s*:\s*((#|gh-)\d+|[A-Za-z]+-\d+)\s*$' # Scan the entire file for lines matching the pattern if grep -Pq "$pattern" "$input_file"; then