Open feitonyliu opened 6 days ago
We could certainly provide it as a backup, but making it only use an env var would be a large downgrade in user experience for most people.
May be add a note saying that the Github setting does not apply when the applications are deployed to hosting facilities such as shinyapps.io.
Currently, chat_github() expects a github credential already setup in the current directory and use gitcreds::gitcreds_get()$password to retrieve the token. I tried to deploy a shiny app using chat_github() with default settings. It works on my computer and not working after being deployed to shinyapps.io, causing a credential not found error.
The suggested change is to retrieve github key using Sys.getenv("GITHUB_API_KEY") and have the token placed in the .Renviron file as GITHUB_API_KEY={github_pat_token}.
There are two benefits making this change:
Thanks
Tony