Github Node Error: Could not get the SHA of the file, when try edit file with # or Emoji in name

Describe the problem/error/question

I try to use many templates for N8N Backup to github.

For example: Github N8N Backups: How to backup workflows with folder structure instead of tags?

And in my case i have an error with GitHub Node, when try to edit file wich name include โ€œ#โ€ or emogi โ€œ:wink:โ€

I analized the source code of this Node: packages/nodes-base/nodes/Github/GenericFunctions.ts ยท [email protected] ยท Kento Ichikawa / N8n ยท GitLab

and I think I find a reason of this problem:

if use:

${encodeURIComponent(filePath)}

enstead":

${encodeURI(filePath)}

there no errors and I always get SHA

Can you please fix it in source code?

What is the error message (if any)?

Could not get the SHA of the file

Information on your n8n setup

  • n8n version: 1.104.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

Hey @semenburov hope all is good. Welcome to the community.

If you found a bug, you can

  • report the bug here
  • take it a step further and propose a fix with a PR
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.