Skip to content

[IMP] tools: check the GitHub and npm logins in the release script - #2073

Merged
ged-odoo merged 1 commit into
masterfrom
master-release-npm-login-ged
Nov 24, 2026
Merged

ged-odoo merged 1 commit into
masterfrom
master-release-npm-login-ged

Conversation

@ged-odoo

Copy link
Copy Markdown
Contributor

Before this PR, the release script creates the GitHub release and publishes on npm as its last steps, after the push. When not logged in to gh or npm, it fails there and leaves the release half done.

This PR checks both logins (gh api user, npm whoami) before anything else, and aborts if one fails. When both succeed, the script shows the GitHub and npm accounts it will use.

Notes:

  • gh api user is used rather than gh auth status: it actually uses the token of the active account, which is the one gh release create uses, and gives the login to display.
  • It only checks the logins, not the rights: an npm account that cannot publish @odoo/owl still fails at the last step.
  • Dry run of the script with git, npm, gh and fs stubbed: logged in to both, the script runs as before and shows both accounts; not logged in to GitHub or to npm, it stops after the failing check, before any question.

Before this commit, the release script creates the GitHub release and
publishes on npm as its last steps, after the push. When not logged in
to gh or npm, it fails there and leaves the release half done.

This commit checks both logins (`gh api user`, `npm whoami`) before
anything else, and aborts if one fails.
@ged-odoo
ged-odoo merged commit 5bfde98 into master Nov 24, 2026
2 checks passed
@ged-odoo
ged-odoo deleted the master-release-npm-login-ged branch November 24, 2026 09:21
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