rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
167 stars 36 forks source link

Update template or logic in `bugReport()` #235

Open cderv opened 3 years ago

cderv commented 3 years ago

I have just discovered rstudioapi::bugReport().

At first I thought it would only help me to fill the system information quickly than today. However, I discovered that it would open the issue for me with a template to copy / paste.

However, the template is out of date now. Maybe this should be updated at least to conform ? Interesting thing is that the template is available online : https://raw.githubusercontent.com/rstudio/rstudio/main/.github/ISSUE_TEMPLATE/bug_report.md, this would allow easier maintenance to update resources/bug-report.md when template is changing. It could also be directly read online 🀷

Otherwise, the logic could be different: The url with the template could directly be opened using the url with parameters benefiting from Github template chooser feature

-url <- "https://github.com/rstudio/rstudio/issues/new"
+url <- "https://github.com/rstudio/rstudio/issues/new?template=bug_report.md"
utils::browseURL(url)

Then only the part about System Details would need to be copied, like this.

### System details

    RStudio Edition : Desktop [Open Source]
    RStudio Version : 2021.11.0.23
    OS Version      : Windows 10 x64 (build 19043)
    R Version       : R version 4.1.0 (2021-05-18)

@kevinushey What do you think ?

Anyway, I am currently using this function, which opens a new page, copying there only the only the relevant part, and opening a new issue using template chooser to comply with current official template, where I paste the system details - not the simpler workflow πŸ˜…

cderv commented 3 years ago

As additional information, maybe the long version name should be also used because the above information does show if this is a preview or daily version.

But maybe this is not important and only the numeric are enough. probably true...

> RStudio.Version()[c("version", "long_version")]
$version
[1] β€˜2021.11.0.23’

$long_version
[1] "2021.11.0-daily+23"

Could be

    RStudio Edition : Desktop [Open Source]
    RStudio Version : 2021.11.0.23 (daily)
    OS Version      : Windows 10 x64 (build 19043)
    R Version       : R version 4.1.0 (2021-05-18)

or using the long form directly if available

    RStudio Edition : Desktop [Open Source]
    RStudio Version : 2021.11.0-daily+23
    OS Version      : Windows 10 x64 (build 19043)
    R Version       : R version 4.1.0 (2021-05-18)