fix(core): Fix issue that pinnedData is not used with Test-Webhooks (#8123)

## Summary
When a workflow gets started via a Test-Webhook the pinned data does get
ignored and the nodes executed anyway.



## Related tickets and issues
> Include links to **Linear ticket** or Github issue or Community forum
post. Important in order to close *automatically* and provide context to
reviewers.



## 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.
- [X] 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: Mutasem Aldmour <mutasem@n8n.io>
This commit is contained in:
Jan Oberhauser
2023-12-27 10:51:53 +01:00
committed by GitHub
parent 7b26a7a621
commit fa8bd8b9eb
4 changed files with 173 additions and 0 deletions

View File

@@ -514,11 +514,16 @@ export async function executeWebhook(
Object.assign(runExecutionData, runExecutionDataMerge);
}
if (workflowData.pinData) {
runExecutionData.resultData.pinData = workflowData.pinData;
}
const runData: IWorkflowExecutionDataProcess = {
executionMode,
executionData: runExecutionData,
sessionId,
workflowData,
pinData: workflowData.pinData,
userId: user.id,
};