Skip to content

fix: bugfix and cleanup#79

Merged
chawyehsu merged 1 commit into
ScoopInstaller:mainfrom
chawyehsu:push-unszkvknrwys
May 8, 2026
Merged

fix: bugfix and cleanup#79
chawyehsu merged 1 commit into
ScoopInstaller:mainfrom
chawyehsu:push-unszkvknrwys

Conversation

@chawyehsu
Copy link
Copy Markdown
Member

@chawyehsu chawyehsu commented May 8, 2026

Bugfix (Relate to #78 (comment))
Removed unnecessary log of webrequest.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed an issue where label removal operations were not targeting the correct label.
  • Chores

    • Corrected exported function naming for better API consistency.
    • Enhanced request tracking by implementing request counter incrementation.
    • Refined logging behavior for improved clarity.

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@chawyehsu chawyehsu self-assigned this May 8, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 38554bca-02b5-4bd8-a3f8-74d7a8bf845a

📥 Commits

Reviewing files that changed from the base of the PR and between dfaf4c0 and 9c5306a.

📒 Files selected for processing (3)
  • src/Comments.psm1
  • src/Github.psm1
  • src/Helpers.psm1

Walkthrough

PowerShell modules are updated with three focused fixes: request logging refactored with counter tracking in Invoke-GithubRequest, the Remove-Label function corrected to use the proper loop variable in API calls, and the Helpers module export list fixed to match the actual function name.

Changes

Request Handling and Export Fixes

Layer / File(s) Summary
Request Handler Logic
src/Github.psm1
Request parameter logging removed, conditional JSON body serialization repositioned, and $env:GH_REQUEST_COUNTER incremented before returning the WebRequest result.
Label Removal Bug Fix
src/Github.psm1
Remove-Label function corrected to interpolate the loop iteration variable $lab instead of parameter $label when building the API endpoint URI.
Module Export Correction
src/Helpers.psm1
Module export list updated from Get-EnvironmentVariables (plural) to Get-EnvironmentVariable (singular) to match the actual function definition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A counter now tracks each request sent,
Labels delete right—the var was misspent,
Exports align with their true function name,
Three little fixes, one PR to claim!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: bugfix and cleanup' is vague and doesn't clearly describe the specific changes made. It doesn't convey what was actually fixed or what was cleaned up. Use a more descriptive title that specifies the main changes, such as 'fix: correct variable name in Remove-Label and fix export in Helpers' or 'fix: resolve API request logging and variable naming issues'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Microsoft Presidio Analyzer (2.2.362)
src/Github.psm1

Microsoft Presidio Analyzer failed to scan this file


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chawyehsu chawyehsu merged commit ec4ac48 into ScoopInstaller:main May 8, 2026
2 checks passed
@chawyehsu chawyehsu deleted the push-unszkvknrwys branch May 8, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant