Adapt to BranchNameKey refactoring

Change-Id: Ia1a7323233f2d78c590696c2bc6ab39b4c52f254
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/PermissionsImpl.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/PermissionsImpl.java
index 6d438ed..5a35e1e 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/PermissionsImpl.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/PermissionsImpl.java
@@ -16,7 +16,7 @@
 
 import static com.google.gerrit.reviewdb.client.RefNames.REFS_CONFIG;
 
-import com.google.gerrit.reviewdb.client.Branch;
+import com.google.gerrit.reviewdb.client.BranchNameKey;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.permissions.PermissionBackend;
@@ -50,7 +50,7 @@
   private boolean can(Project.NameKey project, RefPermission permission) {
     return permissionBackend
         .user(currentUser.get())
-        .ref(Branch.nameKey(project, REFS_CONFIG))
+        .ref(BranchNameKey.create(project, REFS_CONFIG))
         .testOrFalse(permission);
   }
 }