Fix GitHub API authentication and add stats caching for resilient tracking#3
Merged
Lackadaisical-Security merged 5 commits intomainfrom Jan 5, 2026
Merged
Conversation
Co-authored-by: Lackadaisical-Security <205846242+Lackadaisical-Security@users.noreply.github.com>
Co-authored-by: Lackadaisical-Security <205846242+Lackadaisical-Security@users.noreply.github.com>
Co-authored-by: Lackadaisical-Security <205846242+Lackadaisical-Security@users.noreply.github.com>
Co-authored-by: Lackadaisical-Security <205846242+Lackadaisical-Security@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix real-time stats API to properly track data
Fix GitHub API authentication and add stats caching for resilient tracking
Jan 5, 2026
Owner
Lackadaisical-Security
left a comment
There was a problem hiding this comment.
looks good hopefully goes through properly this round xd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The stats tracker was failing to collect GitHub metrics, leaving
github: {}empty in all historical snapshots.Changes
Authentication
tokentoBearerformat for GitHub App tokens (GITHUB_TOKEN)Error handling
except:toexcept Exception:to avoid catching system exitsStats caching
github_cachedflag and visual indicators in output when using cached dataWorkflow
metadata: readpermission for repository metadata accessExample
When API calls fail, the tracker now preserves previous data:
Error messages are now actionable:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/Lackadaisical-Security/Voynich-Script-Decoded/usr/bin/python3 python3 realtime_stats_tracker.py(http block)import os
import urllib.request
import json
token = os.environ.get('GITHUB_TOKEN', None)
print(f'Token exists: {token is not None}')
print(f'Token length: {len(token) if token else 0}')
Try a simple API call
url = 'REDACTED` (http block)
url = 'REDACTED'
headers = {'Accept': 'application/vnd.github.v3+json'}
try:
req = urllib.request.Request(url, headers=headers)` (http block)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.