Skip to content

ci(clone-tracking): use TRAFFIC_TOKEN for the traffic API; skip with a warning when unset - #2532

Merged
ruvnet merged 1 commit into
mainfrom
ci/clone-tracking-traffic-token
Nov 11, 2026
Merged

ruvnet merged 1 commit into
mainfrom
ci/clone-tracking-traffic-token

Conversation

@ruvnet

@ruvnet ruvnet commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Problem

GitHub Clone Tracking → data/clone-data.rvf has failed on every scheduled run since 2026-08-15. The latest was run 41260973562 on 2026-11-01:

gh api repos/ruvnet/RuView/traffic/clones
gh: Resource not accessible by integration (HTTP 403)

The traffic endpoints need the Administration: read repository permission. The workflow GITHUB_TOKEN can never be granted that permission, whatever the permissions: block says, so no change to the YAML alone can fix this.

Fix

  • The scrape now authenticates with a dedicated TRAFFIC_TOKEN secret: a fine-grained PAT scoped to ruvnet/RuView with Administration: read only.
  • A first step checks whether the secret is present.
    • If it is missing, the job emits a ::warning:: and skips the scrape, so nothing is recorded silently.
    • If it is present, every step behaves exactly as before. The commit and push still use the checkout's GITHUB_TOKEN (contents: write).
  • Nothing else changes. No secret has been created or guessed.

Owner action

Add the repository secret TRAFFIC_TOKEN: a fine-grained PAT for ruvnet/RuView with Administration: read. There is no GCP Secret Manager mapping for it.

Then run the workflow once with workflow_dispatch to backfill. GitHub keeps only 14 days of traffic data, so anything older than that is already lost.

🤖 Generated with claude-flow

…rning when unset

/repos/{repo}/traffic/{clones,views} need the "Administration: read"
repository permission, which GITHUB_TOKEN cannot be granted, so every
scheduled run since 2026-08-15 failed with HTTP 403. Use a dedicated
TRAFFIC_TOKEN secret (fine-grained PAT, RuView only, Administration: read)
and, while it is unset, emit a ::warning:: and skip the scrape instead of
failing the job.

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet
ruvnet merged commit 6d2fa6f into main Nov 11, 2026
23 checks passed
@ruvnet
ruvnet deleted the ci/clone-tracking-traffic-token branch November 11, 2026 20:04
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