Add GitHub token environment variable support for Copilot
Add support for environment variables as authentication alternatives to OAuth flow for Copilot. Closes #31172
Release Notes:
- Added support for GH_COPILOT_TOKEN environment variable Copilot authentication
- OAuth flow remains unchanged when no token is provided
We can include the token in HTTPS request headers to hopefully resolve the rate limiting issue in #9483. This change will be part of a separate PR.
Removed added settings and UI matching other API keys. This change will be split off into a separate PR.
Thanks @clauses3! I changed the code to make it work with recent changes. Could you verify that it still works as expected on your end?
Thanks for the changes @bennetbo. Tested and working on linux with the env var set.