ropensci-review-tools / roreviewapi

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

Function to check all variables in submission template #12

Closed mpadge closed 3 years ago

mpadge commented 3 years ago

Call it prior to the main r_bg call to the editor_check() function:

https://github.com/ropensci-review-tools/roreviewapi/blob/21b8b44fde6018a5cb8bf23eb1ffece7a39e14a3/R/plumber.R#L14-L32

If it fails, return a message about the missing/mucked-up variables, but also proceed with the main pkgcheck call if the repourl variable is intact, otherwise message that checks not possible and instruct editors to manually ping check package once template has been fixed.

mpadge commented 3 years ago

ping @noamross this issue is clearly important, and will be addressed asap. Instead of an uninformative 500, the bot will then tell editors (ie. you) that:

  1. The HTML variables are missing/wrong
  2. You'll have to edit them yourself; and
  3. Then manually call @ropensci-review-bot check package.
mpadge commented 3 years ago

Other checks to add: Ensure "Name" field is correctly specified: image Version could also be checked in same way. Ping @maelle

mpadge commented 3 years ago

Re-opening because initial deploy encountered a 500 error ...

mpadge commented 3 years ago

For reference: 500 error is still triggered if the repourl parameter is left blank, but I can't find a way around this for the moment. As long as it has some value, even if it's just garbage, everything works fine, including appropriate messages about URL being invalid.