I might have misunderstood this error message, but https://github.com/r-lib/usethis/issues/316 indicates that maybe I haven't? I attempted to use_github(), but that only partially succeeded, likely because my DESCRIPTION probably wasn't complete.
The bug, I think, is the content of the error message: "Error: URL has a different value in DESCRIPTION.Use overwrite = TRUE to overwrite."
Should the overwrite = TRUE be supplied to use_github? It doesn't seem to allow me to. If not, what function should I be setting to overwrite?
> usethis::use_github()
✔ Checking that current branch is 'master'
Which git protocol to use? (enter 0 to exit)
1: ssh <-- presumes that you have set up ssh keys
2: https <-- choose this if you don't have ssh keys (or don't know if you do)
Selection: 2
● Tip: To suppress this menu in future, put
`options(usethis.protocol = "https")`
in your script or in a user- or project-level startup file, '.Rprofile'.
Call `usethis::edit_r_profile()` to open it for editing.
● Check title and description
Name: dev.to.ol
Description: dev.to.ol
Are title and description ok?
1: Yeah
2: Not now
3: No way
Selection: 1
✔ Creating GitHub repository
✔ Setting remote 'origin' to 'https://github.com/DaveParr/dev.to.ol.git'
✔ Adding GitHub links to DESCRIPTION
Error: URL has a different value in DESCRIPTION.Use `overwrite = TRUE` to overwrite.
> usethis::use_github(overwrite = TRUE)
Error in usethis::use_github(overwrite = TRUE) :
unused argument (overwrite = TRUE)
Generally though, thanks for this package, it's a brilliant tool. Can't believe I even used to do package development without it anymore.
Yes, the error is confusing, but it's being thrown by use_github_links() (or, actually, by use_description_field()), which is called by use_github(), But use_github_links() can also be called directly.
If we want to avoid this -- and the early exit from use_github() after it has only done partial setup -- we need to check for pre-existing URL and BugReports fields and take some appropriate action. I'm not entirely sure what what would be ... abort? ask for permission to overwrite? ask for permission combine old and new?
Re-reading #339, I think the vast majority of use_github() usage is for new-ish packages that don't have pre-existing URL and BugReports fields. So I think if we find them, we should ask for permission to overwrite them (user can always create a more complicated entry afterwards) and abort if we can't get approval.