Skip to contents

Fetches current editor email addresses via get_editor_emails(), inserts a new search record and one recipient row per address into the database, then dispatches emails via Postmark. The notify address is read from the AirTable cache written by the internal 'notify_email_refresh' function. The base URL for click links is read from the ROREVIEWAPI_BASE_URL environment variable. The stats/standard distinction is determined by calling issue_is_stats() on the supplied repo and issue_id.

Usage

send_search(
  repourl,
  repo,
  issue_id,
  subject = "Seeking editors for rOpenSci software submission",
  fetcher = NULL,
  stats_checker = roreviewapi::issue_is_stats
)

Arguments

repourl

URL of the package repository; included in the outgoing emails.

repo

GitHub review repository in org/repo format.

issue_id

Integer issue number in the review repository.

subject

Subject line for the outgoing emails.

fetcher

Function used to fetch editor emails; injectable for testing. Must accept (airtable_base_id, stats) and return a character vector.

stats_checker

Function used to determine submission type; injectable for testing. Must accept (repo, issue_id) and return a logical.

Value

Named list with search_id (integer) and sent (integer).