| gh_message_search | R Documentation |
gh_message_search asks git for commits on the current branch whose
message matches regex, and prints the newest max of them.
sort = "asc" flips that set so the oldest of those hits is first.
The pattern is applied to the whole commit message. Each row has a
number, the date, a short sha, and the subject. The subject is only
the first line, so the match may be further down the message.
When origin is a GitHub remote, the row also has the commit page.
Pass open as that row number to show it in the browser.
The same page is hits$url[n] on the data.frame returned.
regex is an extended regular expression (git log -E --grep).
A plain word works as-is. +, (), and | are special; escape them
to match those characters literally. Matching ignores case unless
ignore_case = FALSE.
gh_message_search(
regex,
repo = "~/bin/umx",
max = 10,
sort = c("desc", "asc"),
ignore_case = TRUE,
open = NULL
)
regex |
Pattern matched against the commit message. |
repo |
Local checkout. Default |
max |
How many of the newest matches to keep. Default |
sort |
|
ignore_case |
Default |
open |
Row number to open on GitHub. Default |
A data.frame (invisibly) with columns n, date, sha, short, subject, url.
Other github:
gh_feature_branch(),
gh_open_PR_url(),
xgh_check_base_name(),
xgh_get_current_branch()
## Not run:
hits <- gh_message_search("double entry")
gh_message_search("double entry", open = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.