fix(GitHub Node): Fix issue that File->Get did not run once per item (#8190)

## Summary
The Operation File -> Get is implemented wrong. Instead of downloading a
file for each of the items it only downloads the file of the first one
and then stops.


## Related tickets and issues

https://linear.app/n8n/issue/NODE-1027/fix-issue-that-github-node-file-get



## Review / Merge checklist
- [x] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [ ] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
   > A feature is not complete without tests.

Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
Jan Oberhauser 2024-01-03 06:06:41 +01:00 committed by GitHub
parent 40c1eeeddd
commit 11cda41214
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2204,6 +2204,7 @@ export class Github implements INodeType {
const newItem: INodeExecutionData = { const newItem: INodeExecutionData = {
json: items[i].json, json: items[i].json,
binary: {}, binary: {},
pairedItem: items[i].pairedItem,
}; };
if (items[i].binary !== undefined) { if (items[i].binary !== undefined) {
@ -2218,9 +2219,8 @@ export class Github implements INodeType {
path as string, path as string,
); );
items[i] = newItem; returnData.push(newItem);
continue;
return [items];
} }
} }