aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/vcs/github_driver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository/vcs/github_driver.rs')
-rw-r--r--crates/shirabe/src/repository/vcs/github_driver.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/crates/shirabe/src/repository/vcs/github_driver.rs b/crates/shirabe/src/repository/vcs/github_driver.rs
index 864b4f3..696851e 100644
--- a/crates/shirabe/src/repository/vcs/github_driver.rs
+++ b/crates/shirabe/src/repository/vcs/github_driver.rs
@@ -1066,19 +1066,7 @@ impl GitHubDriver {
let scopes_failed = array_diff(&scopes_needed, &scopes_issued);
// non-authenticated requests get no scopesNeeded, so ask for credentials
// authenticated requests which failed some scopes should ask for new credentials too
- if headers.is_empty()
- || count(&PhpMixed::List(
- scopes_needed
- .iter()
- .map(|s| Box::new(PhpMixed::String(s.clone())))
- .collect(),
- )) == 0
- || count(&PhpMixed::List(
- scopes_failed
- .iter()
- .map(|s| Box::new(PhpMixed::String(s.clone())))
- .collect(),
- )) > 0
+ if headers.is_empty() || scopes_needed.is_empty() || scopes_failed.len() > 0
{
git_hub_util.authorize_oauth_interactively(
&self.inner.origin_url,