```
} else if (branch.startsWith("refs/heads/") {
    branch = branch.replace("refs/heads/", "");
} else {
```