Skip to content

fix(activity): skip cleanly when no repositories are configured - #5

Open
michaelkage wants to merge 5 commits into
mainfrom
fix/activity-collector-unconfigured
Open

michaelkage wants to merge 5 commits into
mainfrom
fix/activity-collector-unconfigured

Conversation

@michaelkage

@michaelkage michaelkage commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Treat the absence of both GH_ACTIVITY_TOKEN and GH_ACTIVITY_REPOS as an intentional unconfigured state.
  • Exit the activity collector successfully without changing the daily entry when there are no repositories to scan.
  • Preserve fail-closed behavior when one or more configured/discovered repositories were actually scanned and every scan failed.
  • Add regression coverage for account discovery being disabled without the account token and no configured repositories.
  • Clarify the no-token behavior in the README.

Root cause

The November 12 scheduled run created the daily entry successfully, then discovered zero repositories because the account-wide token was absent and the journal repository is deliberately excluded from its own activity scan. The collector treated 0 results === 0 failures === 0 repositories as an all-repositories failure and exited non-zero. This change distinguishes an empty configuration from actual scan failures.

Validation

The PR validation workflow passed on head edd11ffef565f9cb0676f7bcffea76c4125e06b5: all JavaScript syntax checks passed and all 14 Node tests passed. The existing GH_ACTIVITY_TOKEN setup remains necessary for account-wide repository discovery; this patch makes its absence non-fatal, not equivalent to successful account-wide collection.

@michaelkage
michaelkage marked this pull request as ready for review November 12, 2026 15:23

This branch has not been deployed

No deployments
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