vignettes/documenting-discussion.Rmd
documenting-discussion.Rmd
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()
As with all other get-parse
codeflows, this produces
dataframe output.
head(issues) #> title body state #> 1 A very important issue This is the beginning of a conversation open #> created_at closed_at user_login n_comments #> 1 2018-12-30 <NA> emilyriederer 2 #> url number milestone_title #> 1 https://github.com/emilyriederer/experigit/issues/163 163 NA #> milestone_id milestone_number milestone_state milestone_created_at #> 1 NA NA NA <NA> #> milestone_closed_at milestone_due_on assignee_login assignees_login #> 1 <NA> <NA> NA #> labels_name #> 1 head(comments) #> url #> 1 https://github.com/emilyriederer/experigit/issues/163#issuecomment-450574376 #> 2 https://github.com/emilyriederer/experigit/issues/163#issuecomment-450574387 #> id user_login created_at updated_at author_association #> 1 450574376 emilyriederer 2018-12-30 2018-12-30 OWNER #> 2 450574387 emilyriederer 2018-12-30 2018-12-30 OWNER #> body number #> 1 I'm just commenting to add more information. 163 #> 2 Actually, I disagree. My perspective is this. 163
Next, simply pass these into the report_discussion()
function to generate a formatted RMarkdown report.
report_discussion(comments, issues) #> Warning in if (!is.na(issue)) {: the condition has length > 1 and only the first #> element will be used
This is the beginning of a conversationVisit on GitHub
I’m just commenting to add more information.
Actually, I disagree. My perspective is this.
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)
I’m just commenting to add more information.
Actually, I disagree. My perspective is this.