git.github_pr_destination pr_branch parameter doesn't properly insert labels
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 345
- PR merge metrics
- No merged PRs in 30d
Description
The PR branch parameter to the Github PR destination currently only supports the `${CONTEXT_REFERENCE}`, and has no support for other labels.
As an example, I tried to use this configuration, to make the branch name clear.
```python
pr_branch = "public/copybara-${GITHUB_PR_USER}-${GITHUB_PR_NUMBER}",
```
However, instead of the intended result, I got `public/copybara-public/copybara-__GITHUB_PR_USER_-public/copybara-__GITHUB_PR_USER_-__GITHUB_PR_NUMBER_-public/copybara-__GITHUB_PR_USER_-__GITHUB_PR_NUMBER_`.
I believe the relevant code is located here:
https://github.com/google/copybara/blob/0a50f539d312d4fa2d9c9ef12eed4d9102c4758b/java/com/google/copybara/git/GitHubPrDestination.java#L401
Contributor guide
Assessment
This issue has not been assessed yet.