Github Node - I am not sure how set the branch when running a Get Files/Folders

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:

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 :tada:

Looks like this option already exists to select the Branch.

You can find it under Additional Parameters

1 Like

@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.

  • Jordan
1 Like

I think I figured it out.

Thanks @mcnaveen.

1 Like

To make it easier in the future did we add the “Reference” parameter which will be available with the next version.

1 Like

:sunflower: Wow. Thanks @jan

Sure, was not very complicated. Got released with [email protected]

1 Like

Thanks @jan and @mcnaveen!

1 Like

@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

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.