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)

Arguments

project

String containing the project name.

asset

String containing the asset name.

version

String containing the version name.

staging

String containing the path to the staging directory.

url

String containing the URL of the gobbler REST API.

Value

NULL is invisibly returned upon successful approval.

See also

rejectProbation, to reject the probational upload.

uploadDirectory, to specify probational uploads.

Author

Aaron Lun

Examples

info <- startGobbler()
#> Warning: cannot rename file '/tmp/RtmpcPC1yF/file22c475fe3ad' to '/github/home/.local/share/R/gobbler/gobbler-linux-amd64-0.3.4', 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] "2024-09-18 15:57:05 UTC"
#> 
#> $upload_finish
#> [1] "2024-09-18 15:57:05 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] "2024-09-18 15:57:05 UTC"
#> 
#> $upload_finish
#> [1] "2024-09-18 15:57:05 UTC"
#>