Skip to content

Add upload_gist() to upload reprex() output to github gist via gh::gh() - #481

Open
tanho63 wants to merge 4 commits into
tidyverse:mainfrom
tanho63:tan/gist-reprex/190
Open

tanho63 wants to merge 4 commits into
tidyverse:mainfrom
tanho63:tan/gist-reprex/190

Conversation

@tanho63

@tanho63 tanho63 commented Sep 19, 2025

Copy link
Copy Markdown

Closes #190. Also, adds a small bugfix to prevent a preview from opening when reprex(html_preview=FALSE) which makes test code a little prettier.

reprex(print(pi), html_preview = FALSE|> upload_gist()
# ℹ Rendering reprex...
# ✔ Uploaded reprex to <https://gist.github.com/tanho63/fb3acd37a076780ca37233aaa070f7bc>

See: https://gist.github.com/tanho63/fb3acd37a076780ca37233aaa070f7bc

TODO:

  • what testthat tests make sense? The gh::gh() call doesn't feel "in scope" for reprex to test via CI. Is the implementation minimal enough that I can skip adding one?
    • Update: asked @jennybc and this doesn't need a test because the main functionality is calling a gh function.

@tanho63 tanho63 changed the title Add upload_gist() to upload reprex() output to github gist via gh Add upload_gist() to upload reprex() output to github gist via gh::gh() Sep 19, 2025
@tanho63
tanho63 force-pushed the tan/gist-reprex/190 branch from 4b8d4a3 to 165bbe5 Compare September 17, 2026 15:23
@tanho63

tanho63 commented Sep 17, 2026

Copy link
Copy Markdown
Author

update 2026-09-17 (TDD 2026): rebased on latest main.

@hadley
hadley requested a review from jennybc September 17, 2026 15:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fling reprex on the internet e.g. as a gist

1 participant