rstudio / pins-r

Pin, Discover and Share Resources
https://pins.rstudio.com
Other
301 stars 62 forks source link

Fix confusing message about "when reading a pin" for `pin_write()` #786

Closed juliasilge closed 9 months ago

juliasilge commented 9 months ago

If you don't include the username when writing a pin to Connect, it gives a confusing message:

library(pins)
board <- board_connect()
#> Connecting to Posit Connect 2023.07.0 at <https://colorado.posit.co/rsc>
board |> pin_write(10:20, "nice-numbers", type = "json")
#> ! Please use full name when reading a pin: "julia.silge/nice-numbers", not "nice-numbers".
#> Writing to pin 'julia.silge/nice-numbers'

Created on 2023-09-18 with reprex v2.0.2

Notice:

when reading a pin

but we were writing! It happens in rsc_content_find(), which is used a lot and not only when reading. Probably should update this message:

https://github.com/rstudio/pins-r/blob/1a1e450ea7bff945fce7a94dc9fb87d2f778f703/R/board_connect.R#L474

github-actions[bot] commented 8 months ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.