Pretty much as it says: approve a probational upload of a version of a project's asset.
This removes the on_probation
tag from the uploaded version.
approveProbation(project, asset, version, staging, url, spoof = NULL)
String containing the project name.
String containing the asset name.
String containing the version name.
String containing the path to the staging directory.
String containing the URL of the gobbler REST API.
String containing the name of a user on whose behalf this request is being made.
This should only be used if the Gobbler service allows spoofing by the current user.
If NULL
, no spoofing is performed.
NULL
is invisibly returned upon successful approval.
rejectProbation
, to reject the probational upload.
uploadDirectory
, to specify probational uploads.
info <- startGobbler()
#> Warning: cannot rename file '/tmp/RtmpQ3n0nC/file1d1482fcec4' to '/github/home/.local/share/R/gobbler/gobbler-linux-amd64-0.5.0', reason 'Invalid cross-device link'
removeProject("test", info$staging, url=info$url) # to start with a clean slate.
createProject("test", info$staging, url=info$url)
# Mocking up an upload.
src <- allocateUploadDirectory(info$staging)
write(file=file.path(src, "foo"), "BAR")
uploadDirectory("test", "probation", "v1", src,
staging=info$staging, url=info$url, probation=TRUE)
fetchSummary("test", "probation", "v1", registry=info$registry)
#> $upload_user_id
#> [1] "root"
#>
#> $upload_start
#> [1] "2025-06-29 21:24:38 UTC"
#>
#> $upload_finish
#> [1] "2025-06-29 21:24:38 UTC"
#>
#> $on_probation
#> [1] TRUE
#>
# After approval, the probation status disappears.
approveProbation("test", "probation", "v1", staging=info$staging, url=info$url)
fetchSummary("test", "probation", "v1", registry=info$registry)
#> $upload_user_id
#> [1] "root"
#>
#> $upload_start
#> [1] "2025-06-29 21:24:38 UTC"
#>
#> $upload_finish
#> [1] "2025-06-29 21:24:38 UTC"
#>