Skip to content

refactor(sonar): avoid awaiting promises sequentially in loops (typescript:S9382) - #3358

Merged
setchy merged 1 commit into
mainfrom
sonar/S9382
Oct 4, 2026
Merged

setchy merged 1 commit into
mainfrom
sonar/S9382

Conversation

@setchy

@setchy setchy commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

SonarCloud: typescript:S9382 (filtered issues)

Resolves Sonar rule typescript:S9382 — Promises should not be awaited sequentially in a loop (3 issues).

  • useLogins.ts: run account cache pruning with Promise.all instead of awaiting in a for loop.
  • enrich.ts: fetch GraphQL detail batches concurrently with Promise.all (per-batch error logging preserved).
  • LoginWithDeviceFlow.tsx: replace the polling while loop with a recursive poll so the poll/sleep sequence no longer awaits inside a loop.

Lint, tsc, and the full test suite pass.

@github-actions github-actions Bot added the refactor Refactoring of existing feature label Oct 3, 2026
@setchy
setchy marked this pull request as ready for review October 3, 2026 21:24
@setchy
setchy requested a review from afonsojramos as a code owner October 3, 2026 21:24
@setchy setchy changed the title refactor(sonar): avoid awaiting promises sequentially in loops (S9382) refactor(sonar): avoid awaiting promises sequentially in loops (typescript:S9382) Oct 3, 2026
@setchy
setchy enabled auto-merge (squash) October 4, 2026 01:45
@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@setchy
setchy merged commit 77a5fb8 into main Oct 4, 2026
19 checks passed
@setchy
setchy deleted the sonar/S9382 branch October 4, 2026 01:48
@github-actions github-actions Bot added this to the Release 7.9.0 milestone Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in Gitify v7.9.0! 🎉

Downloads for macOS, Windows, and Linux are available on the release page.

Thanks for helping make Gitify better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of existing feature

Development

Successfully merging this pull request may close these issues.

2 participants