action_badge: Add or remove GitHub Actions badges from a repository

action_badgeR Documentation

Add or remove GitHub Actions badges from a repository

Description

  • action_add_badge() - Add a GitHub Actions badge to a file.

  • action_remove_badge() - Remove one or more GitHub Action badges from a file.

Usage

action_add_badge(
  repo,
  workflow = NULL,
  where = "^.",
  line_padding = "\n\n\n",
  file = "README.md"
)

action_remove_badge(repo, workflow_pat = ".*?", file = "README.md")

Arguments

repo

Character. Address of repository in owner/name format.

workflow

Character. Name of the workflow.

where

Character. Regex pattern indicating where to insert the badge, defaults to the beginning of the target file.

line_padding

Character. What text should be added after the badge.

file

Character. Target file to be modified, defaults to README.md.#'

workflow_pat

Character. Name of the workflow to be removed, or a regex pattern that matches the workflow name.

Value

Both action_add_badge() and action_remove_badge() invisibly return a list containing the results of the relevant GitHub API call.


ghclass documentation built on May 29, 2024, 8:44 a.m.