git.origin -> git.github_pr_destination fails when specifying a SHA-1 `ref` on the origin
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 345
- PR merge metrics
- No merged PRs in 30d
Description
I'm attempting to write a macro for a workflow which will take a public Git SoT (`git.origin` is necessary, since this can be sources other than `github` or `gerrit`). I'd like to submit this import as a PR to a private github destination (via `git.github_pr_destination`).
The workflow that gets generated is pretty simple:
```
core.workflow(
name = "some_foo_name",
mode = "SQUASH",
origin = git.origin(
url = url,
ref = "someCommitHash",
),
destination = git.github_pr_destination(
url = private_url,
destination_ref = "master",
pr_branch = "import/some_foo_name/${CONTEXT_REFERENCE}",
),
```
However, when running this workflow, I get a error stating that I need to specify the `pr_branch` for this:
```
ERROR: git.github_pr_destination is incompatible with the current origin. Origin has to be able to provide the contextReference or use '--github-destination-pr-branch' flag
```
Am I going about this incorrectly? What is a more idiomatic way to do this?
Contributor guide
Assessment
This issue has not been assessed yet.