gh icon indicating copy to clipboard operation
gh copied to clipboard

Adding some helper functions?

Open pat-s opened this issue 3 years ago • 3 comments

In {travis} and {tic} we have a bunch of helper funs to undertake some common tasks (permission handling, getting owners, writing secrets and SSH keys) on GitHub:

  • https://github.com/ropenscilabs/travis/blob/f2dd9a3640b0cd8266b0a813c8eaf6bf3775c83d/R/github-key.R
  • https://github.com/ropenscilabs/travis/blob/f2dd9a3640b0cd8266b0a813c8eaf6bf3775c83d/R/github-auth.R

Updating them in two places (and possible more places) is tedious so we were wondering whether it would make sense to add them to {gh}? Under the hood they make use of {usethis}, {gh}, {openssl} and {sodium}. {usethis} could be easily replaced though.

Of course importing {openssl} and {sodium} would be heavy for {gh} so I'd suggest to put them into SUGGESTS and make them optional?

pat-s avatar Aug 27 '20 10:08 pat-s

I would rather put (most of?) these in a FAQ vignette, to avoid new dependencies.

gaborcsardi avatar Nov 09 '20 11:11 gaborcsardi

I also like the idea of an article that showcases usage. As a general idea and as a substitute for gh gaining higher-level functions, which would definitely become a slippery slope.

jennybc avatar Nov 09 '20 17:11 jennybc

I think this theme that showing real usage often drags in other packages is legitimate (and I feel it too). Because you often will need, e.g., data wrangling or other pre-/post-processing when using gh to accomplish specific objectives.

jennybc avatar Nov 09 '20 17:11 jennybc

I think we're now more committed to not growing the scope of gh in this way, so I'm going to close.

hadley avatar Feb 08 '23 17:02 hadley