-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdownload_organization_repos.Rd
46 lines (39 loc) · 1.86 KB
/
download_organization_repos.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/organization.R
\name{download_organization_repos}
\alias{download_organization_repos}
\title{Download archives of GitHub repositories within an account}
\usage{
download_organization_repos(
organizations = NULL,
extra_repos = NULL,
keep = character(0),
dest_folder = getwd()
)
}
\arguments{
\item{organizations}{Account username(s) (vector)}
\item{extra_repos}{Named vector of extra repository names where names are account names.}
\item{keep}{a character vector of repository names to explicitly archive and download.
If this vector is length zero, all account repositories are archived and downloaded.}
\item{dest_folder}{Where to save the folders with the archives.}
}
\description{
Download archives of GitHub repositories within an account
}
\details{
You will need a \href{https://usethis.r-lib.org/articles/git-credentials.html}{GitHub Personal Access Token}.
If \code{organizations} is a personal account username, the PAT needs to be from that account.
As long as you're an owner of the organisation you're trying to back up, absolutely no permissions are required for your PAT.
You will only need to add the \code{repos} scope if you wish to automatically include private repositories in the list of repos to back up.
Note however that there is a workaround using the \code{extra_repos} argument, as documented below.
The reason why you might need \code{extra_repos} is if you want to download archives
of private repositories, while using a GitHub Personal Access Token with no scope.
\href{https://docs.github.com/en/repositories/archiving-a-github-repository/backing-up-a-repository}{GitHub documentation on archives}.
}
\examples{
\dontrun{
download_organization_repos(c("maelle-test", "maelle-test"))
download_organization_repos("maelle-test", keep = "testy2") # only keep the testy2 repo
}
}