gh_rename_repo: Rename a Galactic Polymath lesson GitHub repository online

View source: R/gh_rename_repo.R

gh_rename_repoR Documentation

Rename a Galactic Polymath lesson GitHub repository online

Description

Helper function for lesson_rename(). This function is to catch GitHub up to speed with a locally renamed project. Uses the gh command line interface (which needs to be set up) and gh::gh() to check existence of the repo and change it online.

Usage

gh_rename_repo(WD, gh_proj_name, prompt_user = TRUE)

Arguments

WD

a virtualized path to the lesson you want to rename. Easiest to specify "?" which will invoke pick_lesson(). MUST be the same as the lesson project is named on https://github.com/galacticpolymath.

gh_proj_name

The (OLD) unique project title of this lesson as it is named on https://github.com/galacticpolymath. Not necessarily the same as the ShortTitle used in naming lesson presentations and worksheets; probably more specific with underscores. No default.

prompt_user

do you want to ask user if they def want to rename this before doing so? default=TRUE

Details

This function doesn't give you a free parameter for the new name. It will use the WD folder name to make sure the remote GitHub repo has the same name. Think of this as syncing local and GitHub remote names of the project.


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.