Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generalizing use_github_action() with use_github_file() #1407

Closed
malcolmbarrett opened this issue Mar 29, 2021 · 2 comments · Fixed by #1509
Closed

Generalizing use_github_action() with use_github_file() #1407

malcolmbarrett opened this issue Mar 29, 2021 · 2 comments · Fixed by #1509
Labels
git git, GitHub, and CI in general tooling 🔨 Internal usethis tooling

Comments

@malcolmbarrett
Copy link
Collaborator

malcolmbarrett commented Mar 29, 2021

I'm very interested in the pattern used by use_github_action() as an alternative to use_template() when it makes sense to host files somewhere else (e.g. we want to make it easier to grab a file from R but don't necessarily want to host it in the package itself because it's useful for other purposes).

I think it would be nice to refactor that internal code to a new exported function, e.g. use_github_file(), which could then be called by use_github_action(). The pattern for reading a file from GitHub is, thankfully, not that complex, but it's very useful.

Happy to prepare a PR if it seems like it's worth exporting that code

@hadley
Copy link
Member

hadley commented Apr 12, 2021

Yeah, a PR would be appreciated thanks.

@jennybc
Copy link
Member

jennybc commented Sep 28, 2021

Very related to #1483

@jennybc jennybc added git git, GitHub, and CI in general tooling 🔨 Internal usethis tooling labels Sep 28, 2021
@jennybc jennybc added this to the v2.1.0 milestone Sep 28, 2021
jennybc added a commit that referenced this issue Oct 6, 2021
jennybc added a commit that referenced this issue Oct 7, 2021
* Add use_github_file()

Closes #1407

* Comment not needed now

* Add tests

* Avoid lazy quantifier

* Note a GHE (maybe) TODO

* Support URL parsing for GHE

* Add more real-but-unsupported URLs

* NEWS bullet

* Use use_github_file() in use_github_action()

Closes #1483

* Add more to NEWS bullet

* Mention use_github_file() in use_github_action()

* Use use_github_file() here

* Replace some `master` with `HEAD`

* Work on docs

* Update snapshot test

* Comma

* Target tag 'v1' in r-lib/actions
riccardoporreca added a commit to miraisolutions/r-techguides that referenced this issue Oct 29, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
git git, GitHub, and CI in general tooling 🔨 Internal usethis tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants