aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-20 00:31:45 +0900
committernsfisis <nsfisis@gmail.com>2026-06-20 00:31:49 +0900
commitcac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 (patch)
tree968f438437042e8092752aa521c2d7e6ae28307e /crates/shirabe/src/repository
parent7c5162e7c2f9d466e96248b7482aa98350244e8b (diff)
downloadphp-shirabe-cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7.tar.gz
php-shirabe-cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7.tar.zst
php-shirabe-cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7.zip
feat(php-shim): implement count()
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository')
-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,