Skip to content

Support new GitHub token formats#636

Merged
MichaelMure merged 1 commit intogit-bug:masterfrom
ellsclytn:fix/new-gh-token-format
Apr 19, 2021
Merged

Support new GitHub token formats#636
MichaelMure merged 1 commit intogit-bug:masterfrom
ellsclytn:fix/new-gh-token-format

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 git-bug:master Apr 19, 2021
@MichaelMure
Copy link
Contributor

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.

2 participants