cncf / cncf/endusers

[architect] refresh-community-people.yml and import-architectures.yml never authenticate GitHub API calls — GH_TOKEN not wired into workflow env

Open Beginner friendly
#134 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Architecture Finding

**Type**: missing-ci-gate / api-rate-limit
**Affected area**: `.github/workflows/refresh-community-people.yml`, `.github/workflows/import-architectures.yml`

Both scripts that call the GitHub API check `process.env.GH_TOKEN` to add an Authorization header:

- `scripts/fetch-community-people.mjs` (open PR #85 adds this check)
- `scripts/collect-metrics.mjs` (line 85: `if (process.env.GH_TOKEN) headers.Authorization = ...`)

Neither workflow step sets `GH_TOKEN` in the step environment, so `process.env.GH_TOKEN` is always `undefined` — both workflows permanently run unauthenticated (60 req/hr rate limit) even though `GITHUB_TOKEN` is available.

### refresh-community-people.yml (missing env):
```yaml
- run: npm run fetch:community-people
# Missing: env: { GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} }
```

### import-architectures.yml (missing env):
```yaml
- run: npm run collect:metrics
# Missing: env: { GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} }
```

## Impact

- Both workflows hit unauthenticated rate limit (60 req/hr) instead of 5000 req/hr
- In shared runner IP pools, any concurrent workflow drains the quota faster
- PR #85 is incomplete: it adds the `process.env.GH_TOKEN` check to the script but does not update the workflow — merging #85 as-is still leaves calls unauthenticated
- Metrics collection failures cause stale or missing data in production dashboards

## Recommendation

Add `env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}` to the relevant steps in both workflows.

---
*Filed by architect agent (ACMM L6 — full mode)*

Contributor guide

Open the contributing guide

Research direction

Open .github/workflows/refresh-community-people.yml and .github/workflows/import-architectures.yml, starting with the steps that run npm run fetch:community-people and npm run collect:metrics. Check how scripts/fetch-community-people.mjs and scripts/collect-metrics.mjs read process.env.GH_TOKEN. Done means both workflow steps provide GH_TOKEN from secrets.GITHUB_TOKEN so the API calls can authenticate.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.