Skip to content

Commit

Permalink
automation id added to result variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shourya-itential committed Aug 2, 2023
1 parent 9429ea0 commit 030551b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Sample Output

```
{
"automation_id": 4569ghffhgfdhg67,
"automation_status": "running",
"automation_output": null
}
Expand Down
20 changes: 18 additions & 2 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ async function run() {
.then((res) => {

const result = {
automation_id: automation_id,
automation_status: null,
automation_output: null
}
Expand Down Expand Up @@ -107,6 +108,7 @@ async function run() {
} else {

const result = {
automation_id: automation_id,
automation_status: null,
automation_output: null
}
Expand Down Expand Up @@ -172,13 +174,27 @@ async function run() {

} else setFailed("Failed while starting automation: " + message);
}else {

const result = {
automation_id: null,
automation_status: null,
automation_output: null
}

if (Boolean(Number(automation_status)) === true) {
if (Number(release) <= 2021.1) automationStatus211(res._id);
else automationStatus221(res.data._id);
}
else {
if (Number(release) <= 2021.1) setOutput("results", res._id);
else setOutput("results", res.data._id);
//automation_status set to 0
if (Number(release) <= 2021.1){
result.automation_id = res._id;
setOutput("results", result);
}
else{
result.automation_id = res.data._id
setOutput("results", result);
}
}
}
});
Expand Down

0 comments on commit 030551b

Please sign in to comment.