If you connect to github through OAuth, and then view the scopes in the IntegrationConnection table, you should notice that it is an array of scopes, but with a single string separated by commas.

It seems like the convertToken (
) function isn't correctly splitting the scopes string, because the scopeSeparator for github is a space but as you can see from the screenshot above, the scopes are coming back comma separated. This might be a case where the scopes are space separated when constructing them to be sent to github but formatted in a different way when getting the scopes.
From SyncLinear.com | TRI-828