knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(projmgr)
If the comments of a GitHub issue contain an important discussions regarding your analysis, you may wish to save an immutable copy of this conversation for documentation. For example, consider this important discussion:
You can do this in two steps. First, get
the issue metadata and comments from GitHub with get_issues()
and get_issue_comments()
.
issues <- get_issues(experigit, number = 163) %>% parse_issues() comments <- get_issue_comments(experigit, number = 163) %>% parse_issue_comments()
issues <- readRDS(system.file("extdata", "disc-issues.rds", package = "projmgr", mustWork = TRUE)) comments <- readRDS(system.file("extdata", "disc-comments.rds", package = "projmgr", mustWork = TRUE))
As with all other get-parse
codeflows, this produces dataframe output.
head(issues) head(comments)
Next, simply pass these into the report_discussion()
function to generate a formatted RMarkdown report.
report_discussion(comments, issues)
Note that the issues
dataframe is optional. You can pass only the comments in for documentation, but you do risk missing out on important context from the issue description and metadata.
report_discussion(comments)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.