% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fake-github-app.R
\name{fake_github_app}
\alias{fake_github_app}
\title{A fake GitHub web app}
\usage{
fake_github_app()
}
\value{
A \code{webfakes_app} object.
}
\description{
A \code{\link[webfakes:new_app]{webfakes::new_app()}} application that implements the subset of the
GitHub REST API needed by the gh test suite. It is exported so that
downstream packages that depend on gh can use it to test their own
GitHub-backed code without hitting the real API.
}
\details{
The app accepts any token whose shape is a valid GitHub PAT (40 hex
characters or a \code{ghp_} / \code{github_pat_} / \code{ghs_} / \code{ghr_} / \code{gho_} /
\code{ghu_} prefix). Any other non-empty token is rejected with a 401
"Bad credentials". A missing \code{Authorization} header yields a 401
"Requires authentication" for endpoints that need a user.
}
\examples{
\dontshow{if (rlang::is_installed("webfakes")) withAutoprint(\{ # examplesIf}
app <- fake_github_app()
proc <- webfakes::new_app_process(app)
proc$url()
proc$stop()
\dontshow{\}) # examplesIf}
}
