Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/goose/src/providers/githubcopilot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ impl GithubCopilotProvider {

async fn refresh_api_info(&self) -> Result<CopilotTokenInfo> {
let config = Config::global();
let token = match config.get_secret::<String>("GITHUB_TOKEN") {
let token = match config.get_secret::<String>("GITHUB_COPILOT_TOKEN") {
Ok(token) => token,
Err(err) => match err {
ConfigError::NotFound(_) => {
let token = self
.get_access_token()
.await
.context("unable to login into github")?;
config.set_secret("GITHUB_TOKEN", Value::String(token.clone()))?;
config.set_secret("GITHUB_COPILOT_TOKEN", Value::String(token.clone()))?;
token
}
_ => return Err(err.into()),
Expand Down
Loading