Skip to content

fix: Use HTTP requests for GitHub commit stats#255

Closed
ReenigneArcher wants to merge 1 commit into
masterfrom
fix/github-update
Closed

fix: Use HTTP requests for GitHub commit stats#255
ReenigneArcher wants to merge 1 commit into
masterfrom
fix/github-update

Conversation

@ReenigneArcher
Copy link
Copy Markdown
Member

@ReenigneArcher ReenigneArcher commented May 17, 2026

Description

Replace the ThreadPoolExecutor+PyGithub approach for fetching /stats/commit_activity with direct HTTP requests via helpers.s.get. Add headers parameter, retry logic for 202 responses, handling for 204, and a retry_after option; use monotonic-based deadline and per-request timeouts. Update callers to pass headers and write raw JSON commit activity. Tests updated to mock HTTP responses, add FakeResponse.raise_for_status, and cover 202->success, 204, and timeout behavior.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Replace the ThreadPoolExecutor+PyGithub approach for fetching /stats/commit_activity with direct HTTP requests via helpers.s.get. Add headers parameter, retry logic for 202 responses, handling for 204, and a retry_after option; use monotonic-based deadline and per-request timeouts. Update callers to pass headers and write raw JSON commit activity. Tests updated to mock HTTP responses, add FakeResponse.raise_for_status, and cover 202->success, 204, and timeout behavior.
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c3162f2) to head (a046326).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #255   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          862       869    +7     
=========================================
+ Hits           862       869    +7     
Flag Coverage Δ
Linux 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/updater.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3162f2...a046326. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ReenigneArcher ReenigneArcher marked this pull request as draft May 17, 2026 16:58
@ReenigneArcher ReenigneArcher deleted the fix/github-update branch May 19, 2026 21:43
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