Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dasJ committed Dec 29, 2024
1 parent 828676b commit 701e483
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions ofborg/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,23 @@ impl Config {
}

pub fn github(&self) -> Github {
let token = std::fs::read_to_string(self.github_app.clone().expect("No GitHub app configured").oauth_client_secret_file)
.expect("Couldn't read from GitHub app token");
let token = std::fs::read_to_string(
self.github_app
.clone()
.expect("No GitHub app configured")
.oauth_client_secret_file,
)
.expect("Couldn't read from GitHub app token");
let token = token.trim();
Github::new(
"github.com/NixOS/ofborg",
Credentials::Client(self.github_app.clone().expect("No GitHub app configured").oauth_client_id, token.to_owned()),
Credentials::Client(
self.github_app
.clone()
.expect("No GitHub app configured")
.oauth_client_id,
token.to_owned(),
),
)
.expect("Unable to create a github client instance")
}
Expand Down

0 comments on commit 701e483

Please sign in to comment.