Skip to content

Commit

Permalink
Merge pull request #1 from enterprise-contract/pr/fix-github-links
Browse files Browse the repository at this point in the history
Fix reference for GitHub
  • Loading branch information
robnester-rh authored Oct 10, 2023
2 parents 3c3260f + f96f7d0 commit 2ee13c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ At this point, executing `git commit` will trigger the `check-commit-msg` hook,

|if your commit|use this keyword|value|
|-|-------|-----|
|resolves an issue/ticket|resolves, res, resolved| !123(only for GitHub Issues), PROJ-1234|
|only references an issue/ticket|ref, refs, references, refers to| !123(only for GitHub Issues), PROJ-1234|
|resolves an issue/ticket|resolves, res, resolved| #123(only for GitHub Issues), PROJ-1234|
|only references an issue/ticket|ref, refs, references, refers to| #123(only for GitHub Issues), PROJ-1234|

*Example git commit message*:
```
Expand Down
2 changes: 1 addition & 1 deletion commit-msg/check-commit-message
Original file line number Diff line number Diff line change
Expand Up @@ -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)[ \t]*:[ \t]*(gh-|\!|[A-Za-z]+-)\d+\s*$"
pattern='^(?i)(ref|refs|reference|references|res|resolve|resolves)\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
Expand Down

0 comments on commit 2ee13c7

Please sign in to comment.