socials_post_issue: Create a draft issue to post to Mastodon and LinkedIn

View source: R/socials.R

socials_post_issueR Documentation

Create a draft issue to post to Mastodon and LinkedIn

Description

Formats the body and title of an issue and posts it on "rosadmin/scheduled_socials". The issue will bed opened in a browser for editing and confirmation. Note that issues will not be posted until the labels "draft" and "needs-review" have been removed.

Usage

socials_post_issue(
  time,
  tz = "America/Winnipeg",
  title,
  body,
  where = "mastodon",
  avoid_dups = TRUE,
  add_hash = TRUE,
  dry_run = FALSE,
  open_browser = TRUE,
  over_char_limit = stop,
  verbose = FALSE
)

Arguments

time

Date/time. Date and time at which the post should be made

tz

Character. Timezone (from OlsonNames()) in which to post

title

Character. Title of the post (⁠[Post]⁠ and the date will be prepended and appended

body

Character. Text to be posted (omit the YAML for posting info; #RStats and @rstats@a.gup.pe will be appended for Mastodon, #RStats for LinkedIn), or link to text file with both Mastodon and LinkedIn body text, headed by by —- Mastodon —– and — LinkedIn —–.

where

Character vector. Either mastodon and/or linkedin to specify which platforms this should be posted on.

avoid_dups

Logical. Don't post an issue if any open issue has the same title.

add_hash

Logical. Whether to automatically add the RStats hashtags.

dry_run

Logical. Whether to perform a dry run (do not post, but display draft if verbose = TRUE).

open_browser

Logical. Whether to open the issue in the browser.

over_char_limit

Function. Stop or warn if over the character limit?

verbose

Logical. If dry run, displace draft?


ropensci-org/promoutils documentation built on Nov. 29, 2024, 7:17 p.m.