post_sessioninfo: Post session info to Slack

Description Usage Arguments Details Value Examples

View source: R/sessioninfo.R

Description

Post sessioninfo to Slack as a snippet

Usage

1
2
3
4
5
6
7
post_sessioninfo(
  channel,
  ts = NULL,
  initial_comment = NULL,
  ...,
  token = Sys.getenv("SLACK_API_TOKEN")
)

Arguments

channel

character, channel to post to

ts

character, Slack API time stamp, Default: NULL

initial_comment

character, comment that precedes the snippet, Default: NULL

...

arguments passed to sessioninfo::session_info() if installed else passed to sessionInfo()

token

Slack API token, Default: Sys.getenv("SLACK_API_TOKEN")

Details

channel can be on of the following in an activated team

A pairing of channel and ts can be used instead of a link to post to a thread.

Value

response from Slack api

Examples

1
2
3
4
5
6
7
8
## Not run: 
if(interactive()){

post_sessioninfo(channel = 'slackbot')

 }

## End(Not run)

yonicd/slackreprex documentation built on Sept. 20, 2020, 3:54 a.m.