jdkdev
February 11, 2022, 7:52pm
1
Hi,
I tried adding ?ref=dev in the file path (it seems to work when getting a file). I also thought it might an additional option based on this code here:
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'The email of the author of the commit.',
},
],
},
{
name: 'branch',
displayName: 'Branch',
values: [
{
displayName: 'Branch',
name: 'branch',
type: 'string',
default: '',
description: 'The branch to commit to. If not set the repository’s default branch (usually master) is used.',
},
],
But don’t see it available. I am running version 0.161.0.
Does anyone know how to do it or how I am doing it wrong?
Thanks in advance,
Jordan
1 Like
Hi @jdkdev
Welcome to the n8n community
Looks like this option already exists to select the Branch.
You can find it under Additional Parameters
1 Like
jdkdev
February 12, 2022, 3:29pm
3
@mcnaveen Thanks for the quick reply! And sorry, I confused myself. I’m seeing it on the edit, but not on the get:file, I guess my question is for “Getting Files or Folders”.
Do I need to include ?ref={branch} at the end or is there a different way to specific branch when getting? It seems to work for files but not when the path is a folder.
1 Like
jdkdev
February 12, 2022, 4:21pm
4
I think I figured it out.
Thanks @mcnaveen .
1 Like
jan
February 12, 2022, 5:38pm
5
To make it easier in the future did we add the “Reference” parameter which will be available with the next version.
1 Like
jan
February 13, 2022, 10:53am
7
Sure, was not very complicated. Got released with [email protected]
1 Like
jdkdev
February 13, 2022, 10:25pm
8
Thanks @jan and @mcnaveen !
1 Like
jdkdev
February 14, 2022, 5:10pm
9
@jan ,
It seems that github needs the sha in the body for updating files. I don’t see a way to add that to the node.
Am I missing something again? Thanks in advance for any help.
Best,
Jordan
jdkdev
February 16, 2022, 4:40pm
10
I’ll add that this is only an issue when there is more than one branch involved. It doesn’t seem to error out when I only have one branch in my github repo.