Copies one of two git message preparation templates
Usage
.GitPrepareCommitMsg(
path = ".",
method = c("github", "jira", "github-start", "github-end", "jira-start", "jira-end"),
overwrite = FALSE
)
Arguments
- path
The path directory of your package (with a
.git
folder inside)- method
One of the following (see details for more info):
github
,jira
,github-start
,github-end
,jira-start
,jira-end
. Thegithub
versions looks for numeric starts to a branch name, and then either appends the branch number to the beginning of the message with an octothorp (e.g., 123-branch appends "#123 ") or at the end, wrapped in parenthesis. Thejira
version looks for the alphanumeric code value of a ticket and appends that with square brackets (e.g., ABC-123 appends "[ABC-123] ") to the start or the end. Appending to the end is the default functionality gotgithub
but appending to the start is the default forjira
.- overwrite
If
TRUE
, overwrites the.git/hooks/prepare-commit-msg
file, if it exists (passed tofs::file_copy
)