git.origin -> git.github_pr_destination fails when specifying a SHA-1 `ref` on the origin
See original GitHub issueI’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}",
),
<snip...>
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?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Git push error: "origin does not appear to be a git repository"
But I don't see any source code on the external USB Drive. I see a directory structure with directories like branches, hooks, info,...
Read more >Git References - Git SCM
When you run git commit , it creates the commit object, specifying the parent of that commit object to be whatever SHA-1 value...
Read more >git-show-ref Documentation - Git
Displays references available in a local repository along with the associated commit IDs. Results can be filtered using a pattern and tags can...
Read more >hash-function-transition Documentation - Git
Migrate Git from SHA-1 to a stronger hash function. Background ... still possesses the other properties such as fast object lookup and safe...
Read more >git-fetch Documentation - Git
When no remote is specified, by default the origin remote will be used, ... be a glob on ref names, a ref, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, after reading your comment, I think there may be a slight miscommunication. I’m attempting to specify a SHA-1 for a
git.origin
, not agit.github_pr_origin
.Let me see about gazelle, this is something that might fit into a module; at the very least we would be open to accepting a contribution for gazelle support.