make_bot: Configure the Bot

Description Usage Arguments

View source: R/make_bot.R

Description

Configure the settings to get the bot running on Github Actions.

Usage

1
2
3
4
5
6
7
8
make_bot(
  r_code,
  cron_schedule = cron_run_every(minutes = 15),
  env_vars = list(),
  bot_timeout = 15,
  repo = NULL,
  github_pat = Sys.getenv("GITHUB_PAT")
)

Arguments

r_code

A character with the R code to be executed by the bot.

cron_schedule

A character with cron-style scheduling. Github actions has a minimum time period for scheduled runs to 5 minutes. For details about cron, please check "https://crontab.guru/".

env_vars

A named list with the name and the value of each environment variable to use. E.g., 'list(TWITTER_KEY = "klj3l21kj3l21k", TWITTER_SECRET = "4lh324hl34l23j4hl23j4l23j")'. If you don't want 'make_bot' to push your env vars to Github, then provide a named list with no values, e.g., 'list(TWITTER_KEY = "", TWITTER_SECRET = "")'.

bot_timeout

A numeric with the maximum number of minutes to let the bot script run before GitHub automatically cancels it.

repo

A character with the address of the Github repository in the format "username/repo". This field is not mandatory, it will be used to try to push 'env_vars' to the repository. I.e., If the repository is "https://github.com/jcrodriguez1989/botmaker", then repo is "jcrodriguez1989/botmaker".

github_pat

A character with your Github personal access token (PAT). This field is not mandatory, it will be used to try to push 'env_vars' to the repository. To get your PAT, visit "https://github.com/settings/tokens".


jcrodriguez1989/botmaker documentation built on Dec. 20, 2021, 10:03 p.m.