|
2 | 2 | #' |
3 | 3 | #' Pretty much as it says: approve a probational upload of a version of a project's asset. |
4 | 4 | #' This removes the \code{on_probation} tag from the uploaded version. |
5 | | -#' |
| 5 | +#' |
6 | 6 | #' @param project String containing the project name. |
7 | 7 | #' @param asset String containing the asset name. |
8 | 8 | #' @param version String containing the version name. |
9 | 9 | #' @param spoof String containing the name of a user on whose behalf this request is being made. |
10 | | -#' This should only be used if the Gobbler service allows spoofing by the current user. |
| 10 | +#' This should only be used if the Gobbler service allows spoofing by the current user. |
11 | 11 | #' If \code{NULL}, no spoofing is performed. |
12 | 12 | #' @inheritParams createProject |
13 | 13 | #' |
|
17 | 17 | #' \code{\link{rejectProbation}}, to reject the probational upload. |
18 | 18 | #' |
19 | 19 | #' \code{\link{uploadDirectory}}, to specify probational uploads. |
20 | | -#' |
| 20 | +#' |
21 | 21 | #' @author Aaron Lun |
22 | 22 | #' @examples |
23 | 23 | #' info <- startGobbler() |
24 | 24 | #' removeProject("test", info$staging, url=info$url) # to start with a clean slate. |
25 | 25 | #' createProject("test", info$staging, url=info$url) |
26 | 26 | #' |
27 | | -#' # Mocking up an upload. |
| 27 | +#' # Mocking up an upload. |
28 | 28 | #' src <- allocateUploadDirectory(info$staging) |
29 | 29 | #' write(file=file.path(src, "foo"), "BAR") |
30 | | -#' uploadDirectory("test", "probation", "v1", src, |
| 30 | +#' uploadDirectory("test", "probation", "v1", src, |
31 | 31 | #' staging=info$staging, url=info$url, probation=TRUE) |
32 | 32 | #' fetchSummary("test", "probation", "v1", registry=info$registry) |
33 | 33 | #' |
34 | 34 | #' # After approval, the probation status disappears. |
35 | 35 | #' approveProbation("test", "probation", "v1", staging=info$staging, url=info$url) |
36 | 36 | #' fetchSummary("test", "probation", "v1", registry=info$registry) |
37 | | -#' |
| 37 | +#' |
38 | 38 | #' @export |
39 | 39 | approveProbation <- function(project, asset, version, staging, url, spoof=NULL) { |
40 | 40 | dump_request(staging, url, "approve_probation", list(project=project, asset=asset, version=version), spoof=spoof) |
|
0 commit comments