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

Support new GitHub token formats #636

Merged
merged 1 commit into from Apr 19, 2021
Merged

Support new GitHub token formats #636

merged 1 commit into from Apr 19, 2021

Conversation

ellsclytn
Copy link
Contributor

GitHub have introduced a new format for their access tokens, which does
not fit within the rules of the previous regex. For the time being, the
previous token format is still being supported by GitHub, so it makes
sense to continue allowing legacy tokens.

https://github.blog/changelog/2021-03-04-authentication-token-format-updates/

GitHub have introduced a new format for their access tokens, which does
not fit within the rules of the previous regex. For the time being, the
previous token format is still being supported by GitHub, so it makes
sense to continue allowing legacy tokens.

https://github.blog/changelog/2021-03-04-authentication-token-format-updates/
@ellsclytn
Copy link
Contributor Author

I went for the approach of two separate regexes because I think it's a little more readable, and a little easier to maintain (dropping support for legacy tokens is as simple as deleting the old regex, and its use in the if statement)

@MichaelMure MichaelMure merged commit c2a30a3 into MichaelMure:master Apr 19, 2021
@MichaelMure
Copy link
Owner

LGTM, thanks!

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.

None yet

2 participants