Skip to content

Commit

Permalink
Added support for accessing execution location through script (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
vedkribhu authored Nov 18, 2023
1 parent f0b36ff commit 285b940
Show file tree
Hide file tree
Showing 5 changed files with 518 additions and 10 deletions.
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();

// 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

0 comments on commit 285b940

Please sign in to comment.