Skip to content

Commit

Permalink
Added: Replace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
agnostic-apollo committed Jan 8, 2022
1 parent 8c805dd commit a538b43
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions create-conventional-changelog
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ ccc_run() {
fi


# Replaces issue references with links
# Example: "closes #666" with "closes [#666]($REPO_URL/issue/666)
# Replaces issue references with link anchor
# Example: "closes #666" with "closes [#666]($REPO_URL/issues/666)
# https://github.com/gitbucket/gitbucket/wiki/How-to-Close-Reference-issues-and-pull-request
commit_message="$(printf "%s" "$commit_message" | sed -r -e 's/(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #([0-9]+)/\1 [#\2\]('"${REPO_URL//\//\\\/}"'\/issues\/\2)/gI')"
commit_message="$(printf "%s" "$commit_message" | sed -r -e 's/(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|issue) #([0-9]+)/\1 [#\2\]('"${REPO_URL//\//\\\/}"'\/issues\/\2)/gI')"

# Add 4 spaces to start of each line so that markdown list does not break
commit_message="$(printf "%s" "$commit_message" | sed -r -e 's/^(.)/ \1/g')"
Expand Down Expand Up @@ -404,7 +404,6 @@ ccc_create_parent_path() {

}


##
# ccc_contains_newline `variable_value`
##
Expand Down

0 comments on commit a538b43

Please sign in to comment.