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

Fix for issue with private key no longer working as a buffer #347

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

feedmypixel
Copy link
Contributor

@feedmypixel feedmypixel commented Jan 22, 2025

So with the bump of @octokit/auth-app from v6.* -> v7.* it bumped its own dependency of universal-github-app-jwt from v1.* -> v2.*

The universal-github-app-jwt v2 has introduced some work that replaces newlines within private keys - https://github.com/gr2m/universal-github-app-jwt/blob/d52064d3395a02363b6f80afeeb5d91e0a5f2040/index.js#L17

This work looks like it came in in v2.1.1 - gr2m/universal-github-app-jwt#96

Essentially what this means is with the latest version the privateKey must be a string rather than a buffer.

This commit fixes this issue

So with the bump of @octokit/auth-app from v6.* -> v7.* it bumped its
own dependency of universal-github-app-jwt from v1.* -> v2.*

The universal-github-app-jwt v2 has introduced some work that replaces
newlines within private keys - https://github.com/gr2m/universal-github-app-jwt/blob/d52064d3395a02363b6f80afeeb5d91e0a5f2040/index.js#L17

This work looks like it came in in v2.1.1 - gr2m/universal-github-app-jwt#96

Essentially what this means is with the latest version the privateKey
must be a string rather than a buffer.

This code fixes this issue
@feedmypixel feedmypixel merged commit d06a20f into main Jan 22, 2025
1 check passed
@feedmypixel feedmypixel deleted the fix-for-universal-github-app-jwt-bump branch January 22, 2025 18:32
feedmypixel added a commit that referenced this pull request Jan 24, 2025
This refactor means that the tests and production code are using the
same work. The only difference being the stubs pass a baseUrl to point
to cdp-portal-stubs, in Journey tests.

This work will now the privateKey error we had in #347
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.

2 participants