Skip to content

chore(ci): use GITHUB_TOKEN instead of NPM_TOKEN PAT - #5845

Merged
jmfrancois merged 2 commits into
masterfrom
chore/ci-drop-npm-token-pat
Sep 4, 2026
Merged

chore(ci): use GITHUB_TOKEN instead of NPM_TOKEN PAT#5845
jmfrancois merged 2 commits into
masterfrom
chore/ci-drop-npm-token-pat

Conversation

@jmfrancois

Copy link
Copy Markdown
Contributor

What is the problem this PR is trying to solve?

CI relies on a personal PAT (NPM_TOKEN secret) to auth against npm.pkg.github.com for installing @talend/locales-* packages. That's a personal token as a shared org secret — bus-factor / offboarding risk, and gives CI more privilege than it needs.

What is the chosen solution to this problem?

Swap secrets.NPM_TOKEN for the built-in github.token (GITHUB_TOKEN) everywhere in .github/workflows/* and .github/actions/setup-node. This works for:

  • installing our own repo's packages (same-repo, always fine)
  • publishing talend/ui's own packages during release (changeset.yml / pre-release.yml, same-repo write — added packages: write/packages: read to the relevant workflow permissions blocks, since an explicit permissions: block zeroes any unlisted scope)
  • installing @talend/locales-*, which are published from a different, currently-private repo (Talend/i18n-product) — GITHUB_TOKEN cannot read cross-repo private packages, PAT-free or not

⚠️ Prerequisite before merge: an admin on Talend/i18n-product needs to flip the @talend/locales-* packages to public visibility. Without that, install steps will 401 on those packages once the PAT is gone. Once merged and packages are public, the NPM_TOKEN org/repo secret can be deleted.

Please check if the PR fulfills these requirements

  • The PR have used yarn changeset to a request a release from the CI if wanted.
  • The PR commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features) And non reg done before need review
  • Docs have been added / updated (for bug fixes / features)
  • Related design / discussions / pages (not in jira), if any, are all linked or available in the PR

[ ] This PR introduces a breaking change

Drops the dependency on a personal PAT stored as the NPM_TOKEN secret.
GITHUB_TOKEN can auth to npm.pkg.github.com for both installing our
GitHub Packages deps (once @talend/locales-* are made public - PAT was
only required for that cross-repo read) and publishing talend/ui's own
packages (same-repo write). Adds packages: read/write permission where
needed since jobs with an explicit permissions block otherwise default
unlisted scopes to none.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b6c35cd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Storybook for this PR deployed on this github page

@jmfrancois
jmfrancois marked this pull request as ready for review September 4, 2026 06:39
@jmfrancois
jmfrancois temporarily deployed to pull_request_unsafe September 4, 2026 09:39 — with GitHub Actions Inactive
@jmfrancois
jmfrancois temporarily deployed to pull_request_unsafe September 4, 2026 09:39 — with GitHub Actions Inactive
@jmfrancois
jmfrancois temporarily deployed to pull_request_unsafe September 4, 2026 09:39 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
Title Lines Statements Branches Functions
assets-api Coverage: 28%
28.4% (25/88) 30.76% (16/52) 21.42% (3/14)
cmf Coverage: 89%
89.43% (1244/1391) 83.46% (626/750) 89.76% (351/391)
cmf-cqrs Coverage: 86%
86.33% (158/183) 71.42% (60/84) 82.45% (47/57)
cmf-router Coverage: 70%
69.23% (135/195) 55.71% (78/140) 56.81% (25/44)
components Coverage: 90%
90.63% (5564/6139) 82.41% (3228/3917) 88.14% (1390/1577)
containers Coverage: 84%
83.44% (1391/1667) 75.16% (702/934) 75% (327/436)
dataviz Coverage: 85%
85.67% (329/384) 65% (156/240) 75.94% (120/158)
design-system Coverage: 67%
66.9% (1039/1553) 51.68% (552/1068) 53.92% (220/408)
faceted-search Coverage: 85%
85.35% (641/751) 80% (292/365) 82.24% (227/276)
flow-designer Coverage: 73%
72.22% (671/929) 77.63% (413/532) 70.92% (200/282)
forms Coverage: 86%
86.23% (1654/1918) 76.71% (939/1224) 84.77% (462/545)
http Coverage: 100%
100% (85/85) 98.07% (51/52) 100% (34/34)
sagas Coverage: 92%
92.3% (24/26) 66.66% (4/6) 50% (2/4)
stepper Coverage: 81%
81.81% (153/187) 60.43% (55/91) 81.25% (39/48)
utils Coverage: 100%
100% (73/73) 90.9% (10/11) 100% (24/24)

@jmfrancois
jmfrancois merged commit ad59239 into master Sep 4, 2026
8 checks passed
@jmfrancois
jmfrancois deleted the chore/ci-drop-npm-token-pat branch September 4, 2026 12:12
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