Commit f4bcfdd
feat(copilot): load GitHub token from environment (#276)
* feat(copilot): load GitHub token from environment
The copilot module now first tries to load the GitHub token from the
environment variable 'GITHUB_TOKEN'. If the variable is not set, it
falls back to loading the token from the file.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* feat(copilot): Load GitHub token only in GitHub Codespaces
This commit modifies the get_cached_token function to load the GitHub
token from the environment only when running in GitHub Codespaces. This
change ensures that the token is not inadvertently loaded in other
environments.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 74db48f commit f4bcfdd
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
0 commit comments