[architect] setup-node + npm ci block duplicated across 9 workflow files, with drifting node-version handling
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1577 by @mrbobbytables — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, javascript, node.js
Research direction
Read the listed .github/workflows/*.yml files and compare the repeated actions/setup-node and npm ci steps, including how each handles NODE_VERSION. Start by adding the composite action at .github/actions/setup-node-deps/action.yml, then check that all 11 steps across the nine workflows use it and the version handling is consistent. The issue says workflow edits require a human or an agent with Workflows permission.
Written by the indexing model from the issue text.
Description
Architecture Finding
Type: tech-debt (duplicated CI configuration)
Affected area: .github/workflows/*.yml
The same four-line block —
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: <22 or ${{ env.NODE_VERSION }}>
cache: npm
- run: npm ci
is repeated verbatim across 11 job steps in 9 workflow files:
ci.yml (2 jobs), architecture-submission.yml, audit-schedule.yml,
check-links.yml, pr-queue-hygiene.yml, refresh-community-people.yml,
refresh-metrics.yml, refresh-radar-reports.yml.
The node-version handling has already drifted: architecture-submission.yml,
check-links.yml, refresh-community-people.yml, refresh-metrics.yml and
refresh-radar-reports.yml define an env.NODE_VERSION: '22' and reference it;
ci.yml, audit-schedule.yml and pr-queue-hygiene.yml hardcode the literal
22 directly in the setup-node step instead. A future Node bump has two
different places to remember to edit depending on which file a contributor
copies from, and nothing catches an inconsistency if one workflow is missed.
Impact
Nine independent copies of the same setup step mean a future change to the
install step itself (e.g. adding a shared cache key, an engine-version check,
or a corepack enable) has to be applied at 11 call sites and re-verified at
each one, with no single place that proves they still agree. The existing
node-version drift is a concrete instance of exactly this already happening.
Recommendation
Extract the block into a composite action,
.github/actions/setup-node-deps, taking node-version as an input
(defaulting to '22'), and have every workflow call
uses: ./.github/actions/setup-node-deps (with node-version: ${{ env.NODE_VERSION }} where a workflow already keeps that variable) in place of
its own setup-node+npm-ci pair.
- Composite action added at
.github/actions/setup-node-deps/action.yml - All 11 job steps across the 9 workflow files above call the composite
action instead of repeating setup-node+npm-ci - The
env.NODE_VERSIONvs. hardcoded22inconsistency is resolved
(every workflow either defines the env var and passes it, or relies on
the action's default)
Note for whoever picks this up: this agent runs at the contributor
token tier, which lacks the Workflows permission, so any diff touching
.github/workflows/** is rejected server-side regardless of what the hive
installation grants. The companion PR to this issue adds only the composite
action itself (not under .github/workflows/), which is pushable. The two
unchecked boxes above — rewiring the 9 workflow files to call it — require a
human or an ISSUES_PRS_MERGE-tier agent to land.
Filed by architect agent (ACMM L5 — hold-gated mode).
🐝 Hive Agent: architect | Instance: hosted-available-lke648397-260827-5n31 | SHA: 7bb743d
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 3
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 597
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
[quality] Architecture catalog lists "public cloud" and "public-cloud" as two tags, splitting filter resultsPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality stage/040-covered-by-pr testing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
a11y: search button accessible name does not contain its visible label (WCAG 2.5.3)May be free again A pull request for this issue was closed without being merged. Openblocked bug hive/claimed-by-scanner needs-human
Difficulty 4/5 3-5 days Newbie friendliness 39/100
cncf/endusers#1618 · 8 comments ·
Maintainers usually reply within 1 day
-
🐝 Hive Advisory ReportMay be free again A pull request for this issue was closed without being merged. Openhive/advisory
Difficulty 5/5 Over a week Newbie friendliness 15/100
cncf/endusers#23 · 7 comments ·
Maintainers usually reply within 1 day
Similar issues
-
admission-deferred priority: medium status: ready work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melodic-software/claude-code-plugins#10887 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 91/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
enhancement ui-dashboard
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day