r-lib / credentials

Tools for Managing SSH and Git Credentials
https://docs.ropensci.org/credentials
Other
72 stars 5 forks source link

Fix a partial arg match warning #4

Closed jennybc closed 4 years ago

jennybc commented 4 years ago

I've put credentials::set_github_pat(verbose = FALSE) in my .Rprofile, which is quite nifty. But I also always have partial match warnings turned on and so I see this at startup:

Warning messages:
1: partial match of 'status' to 'status_code' 
2: partial match of 'status' to 'status_code' 
3: partial match of 'status' to 'status_code'
jeroen commented 4 years ago

Thanks, nice catch.

jeroen commented 4 years ago

I just improved set_github_pat() a bit more, I think it had some un-logical flow. I also added a parameter to disable validation (in case you don't want to make the api call every time).

Could you test it again? Do you have suggestions on how to make this more user friendly?

jennybc commented 4 years ago

I pulled and have restarted. All seems well. I'll keep an eye out for any more user-friendliness touches. Here's how we check and present the PAT situation in usethis currently:

https://github.com/r-lib/usethis/blob/2b7542a775c4ba8a7999c3e6471530f47906e5d0/R/git.R#L498-L524