Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for accessing execution location through script #1336

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
unreleased:
new features:
- GH-1336 Added support for fetching execution location context through script
chores:
- Updated dependencies

7.35.0:
date: 2023-11-02
new features:
Expand Down
6 changes: 5 additions & 1 deletion lib/runner/extensions/event.command.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ module.exports = {
shouldSkipExecution = true;
});

const currentEventItem = event.parent && event.parent();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add comment about why the current item is .parent?


// finally execute the script
this.host.execute(event, {
id: executionId,
Expand All @@ -468,7 +470,9 @@ module.exports = {
// legacy options
legacy: {
_itemId: item.id,
_itemName: item.name
_itemName: item.name,
_itemPath: item.getPath && item.getPath(),
_eventItemName: currentEventItem && currentEventItem.name
}
}, function (err, result) {
this.host.removeAllListeners(EXECUTION_REQUEST_EVENT_BASE + executionId);
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"node-forge": "1.3.1",
"node-oauth1": "1.3.0",
"performance-now": "2.1.0",
"postman-collection": "4.2.1",
"postman-collection": "4.3.0",
"postman-request": "2.88.1-postman.33",
"postman-sandbox": "4.3.0",
"postman-sandbox": "4.4.0",
"postman-url-encoder": "3.0.5",
"serialised-error": "1.1.3",
"strip-json-comments": "3.1.1",
Expand Down
Loading
Loading