Fix default scopes resolution

The introduction of the scopes description in Change-Id: I80f30fcb6
failed to update the key of the default scopes, causing the plugin
to malfunction when no specific scopes configuration were defined.

Fix the problem by replacing the "scopes" string with a proper
ScopeKey associated with the expected key created when defining
a default section for scopes in gerrit.config.

Change-Id: I4cff4b93d25a77c50fb0cc93f9234a40a9f5f8d5
diff --git a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java
index eb81e47..f0799f6 100644
--- a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java
+++ b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java
@@ -50,6 +50,7 @@
   public static final String GERRIT_LOGIN = "/login";
   public static final String GERRIT_LOGOUT = "/logout";
   public static final String GITHUB_PLUGIN_OAUTH_SCOPE = "/plugins/github-plugin/static/scope.html";
+  public static final ScopeKey GITHUB_DEFAULT_SCOPES_KEY = new ScopeKey("scopes", null, 0);
 
   public final String gitHubUrl;
   public final String gitHubApiUrl;
@@ -171,9 +172,9 @@
   }
 
   public Scope[] getDefaultScopes() {
-    if (scopes == null || scopes.get("scopes") == null) {
+    if (scopes == null || scopes.get(GITHUB_DEFAULT_SCOPES_KEY) == null) {
       return new Scope[0];
     }
-    return scopes.get("scopes").toArray(new Scope[0]);
+    return scopes.get(GITHUB_DEFAULT_SCOPES_KEY).toArray(new Scope[0]);
   }
 }