Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelogen not creating the release when authenticated with gh cli #210

Open
danielpza opened this issue Aug 7, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@danielpza
Copy link

danielpza commented Aug 7, 2024

Environment

package and node version

❯ npm why changelogen
[email protected] dev
❯ node --version
v22.4.1

OS: linux

Reproduction

https://github.com/danielpza/changelog-gh-cli-issue

Describe the bug

changelogen doesn't pick the authentication from the gh cli when creating a new release

On https://github.com/unjs/changelogen?tab=readme-ov-file#changelogen-gh-release:

By default in unauthenticated mode, changelogen will open a browser link to make manual release. By providing github token, it can be automated.

  • Using GitHub CLI token when authenticated with gh auth login

Locally:

❯ gh auth status
github.com
  ✓ Logged in to github.com account danielpza (keyring)

❯ npm run release

> [email protected] release
> changelogen --release --push

ℹ Generating changelog for ...master                                                                                                 6:09:56 PM
ℹ Bumping npm package version from 0.0.0 to 0.0.1 (patch)                                                                            6:09:56 PM
ℹ Creating  /home/daniel/projects/changelog-gh-cli-issue/CHANGELOG.md                                                                6:09:56 PM
ℹ Followup in the browser to manually create the release.                                                                            6:09:58 PM

However when feeding the GH token manually it does work as expected:

❯ GH_TOKEN=$(gh auth token) npm run release

> [email protected] release
> changelogen --release --push

ℹ Generating changelog for v0.0.1...v0.0.1                                                                                           6:11:08 PM
ℹ Bumping npm package version from 0.0.1 to 0.0.2 (patch)                                                                            6:11:08 PM
ℹ Updating /home/daniel/projects/changelog-gh-cli-issue/CHANGELOG.md                                                                 6:11:08 PM
✔ Synced v0.0.2 to Github releases!                                                                                                  6:11:10 PM

Additional context

No response

Logs

No response

Tasks

Preview Give feedback
No tasks being tracked yet.
@danielpza danielpza added the bug Something isn't working label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant