ropensci-review-tools / roreviewapi

API endpoint for package reviews via ropensci-review-bot
https://docs.ropensci.org/roreviewapi
4 stars 1 forks source link

Label version service #9

Closed xuanxu closed 3 years ago

xuanxu commented 3 years ago

As mentioned here, in order to get the latest versioned stats label, an external service is needed.

It should receive the grade (bronze/silver/gold) and the repo + issue number and should label that issue with the correct versioned label, for example: 6/approved-bronze-v0.0.1

Once it's ready, we can change the ApproveResponder to use it.

mpadge commented 3 years ago

@xuanxu The endpoint is stats_badge with 2 parameters of:

Example

port <- 8000L
repo <- "ropenscilabs/statistical-software-review"
issue_num <- 10

library (httr)
sprintf ("http://<server-IP-address>:%s/stats_badge?repo=%s&issue_num=%s",
         as.integer (port), repo, issue_num) |>
    GET () |>
    content ()
#> [[1]]
#> [1] "6\approved-bronze-v0.0.1"

Created on 2021-08-23 by the reprex package (v2.0.0.9000)

There are 3 issues it can be tested with here, here, and here, which should respectively return bronze, silver, and gold. Let me know if there's anything that should be done here. Thanks!


Edit: The <server-IP-address> is in current settings-production.yml for the editorcheck endpoint.