mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Github Node): Fix fetch of file names with ? character (#12206)
This commit is contained in:
@@ -2128,7 +2128,7 @@ export class Github implements INodeType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`;
|
endpoint = `/repos/${owner}/${repository}/contents/${encodeURIComponent(filePath)}`;
|
||||||
} else if (operation === 'delete') {
|
} else if (operation === 'delete') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// delete
|
// delete
|
||||||
@@ -2165,7 +2165,7 @@ export class Github implements INodeType {
|
|||||||
body.branch as string | undefined,
|
body.branch as string | undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`;
|
endpoint = `/repos/${owner}/${repository}/contents/${encodeURIComponent(filePath)}`;
|
||||||
} else if (operation === 'get') {
|
} else if (operation === 'get') {
|
||||||
requestMethod = 'GET';
|
requestMethod = 'GET';
|
||||||
|
|
||||||
@@ -2179,11 +2179,11 @@ export class Github implements INodeType {
|
|||||||
qs.ref = additionalParameters.reference;
|
qs.ref = additionalParameters.reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`;
|
endpoint = `/repos/${owner}/${repository}/contents/${encodeURIComponent(filePath)}`;
|
||||||
} else if (operation === 'list') {
|
} else if (operation === 'list') {
|
||||||
requestMethod = 'GET';
|
requestMethod = 'GET';
|
||||||
const filePath = this.getNodeParameter('filePath', i);
|
const filePath = this.getNodeParameter('filePath', i);
|
||||||
endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`;
|
endpoint = `/repos/${owner}/${repository}/contents/${encodeURIComponent(filePath)}`;
|
||||||
}
|
}
|
||||||
} else if (resource === 'issue') {
|
} else if (resource === 'issue') {
|
||||||
if (operation === 'create') {
|
if (operation === 'create') {
|
||||||
|
|||||||
Reference in New Issue
Block a user