nest_commits_by_pattern | R Documentation |
Nest all commits by each pattern found in the commit messages
nest_commits_by_pattern( repo, pattern = c(Issues = "#[[:digit:]]+"), pattern.table = NULL, ref = "main", silent = TRUE )
repo |
a path to a repository or a |
pattern |
Named vector with regex pattern to expose commits, like |
pattern.table |
data.frame with two columns: pattern and description of the pattern. This is used as correspondence table to add some names to existing patterns. |
ref |
The name of a reference to list commits from e.g. a tag or a branch. The default is NULL for the current branch. |
silent |
Logical. Whether to hide messages. |
A tibble with a row for each different pattern found in commit messages and following columns:
pattern.type: name of the pattern found in the commit message
pattern.content: pattern found in the commit message
pattern.title: pattern.content or title used in the pattern.table a nested 'data' column with all related commits
pattern_numeric: extraction of numeric value in pattern.content
link_pattern: internal url of the pattern in the future HTML gitbook
data: a nested list of tibbles with commits content as issued from get_commits_pattern()
repo <- fake_repo() nest_commits_by_pattern(repo) # With table of correspondence pattern.table <- data.frame( number = c("#2", "#1", "#1000"), title = c("#2 A second issue to illustrate a blog post", "#1 An example of issue", "#1000 issue with no commit")) nest_commits_by_pattern( repo, pattern.table = pattern.table, pattern = c("Tickets" = "ticket[[:digit:]]+", "Issues" = "#[[:digit:]]+"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.