Skip to content

Commit d7d9e6d

Browse files
committed
🔊 Print application name in status log
1 parent 528fb3f commit d7d9e6d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

‎dist/action.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19916,7 +19916,7 @@ var getDeploymentStatus = async (uuid2) => {
1991619916
process.exit(1);
1991719917
}
1991819918
const response = await result.json();
19919-
return response.status;
19919+
return response;
1992019920
};
1992119921
void (async () => {
1992219922
const deployments = await deploy();
@@ -19937,9 +19937,9 @@ void (async () => {
1993719937
(uuid3) => status[uuid3] !== "finished" && status[uuid3] !== "failed"
1993819938
)) {
1993919939
const nextStatus = await getDeploymentStatus(uuid2);
19940-
if (nextStatus !== status[uuid2]) {
19941-
(0, import_core.info)(`Deployment ${uuid2} status: ${nextStatus}`);
19942-
status[uuid2] = nextStatus;
19940+
if (nextStatus.status !== status[uuid2]) {
19941+
(0, import_core.info)(`Deployment ${nextStatus.application_name} (${uuid2}) status: ${nextStatus}`);
19942+
status[uuid2] = nextStatus.status;
1994319943
}
1994419944
if (status[uuid2] === "failed") {
1994519945
(0, import_core.setFailed)(`Deployment ${uuid2} failed`);

‎src/action.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ const getDeploymentStatus = async (uuid: string) => {
8383

8484
const response = (await result.json()) as {
8585
status: "in_progress" | "finished" | "queued" | "failed";
86+
application_name: string;
8687
};
8788

88-
return response.status;
89+
return response;
8990
};
9091

9192
void (async () => {
@@ -99,7 +100,7 @@ void (async () => {
99100
deploymentUUIDs.map((uuid) => [uuid, "queued"]),
100101
);
101102
const endTime = Date.now() + waitTimeSeconds * 1000;
102-
// Pause between attempts
103+
// Pause between updates
103104
const pause = 5000;
104105

105106
while (Object.values(status).some((s) => s !== "finished")) {
@@ -112,9 +113,11 @@ void (async () => {
112113
(uuid) => status[uuid] !== "finished" && status[uuid] !== "failed",
113114
)) {
114115
const nextStatus = await getDeploymentStatus(uuid);
115-
if (nextStatus !== status[uuid]) {
116-
info(`Deployment ${uuid} status: ${nextStatus}`);
117-
status[uuid] = nextStatus;
116+
if (nextStatus.status !== status[uuid]) {
117+
info(
118+
`Deployment ${nextStatus.application_name} (${uuid}) status: ${nextStatus}`,
119+
);
120+
status[uuid] = nextStatus.status;
118121
}
119122

120123
if (status[uuid] === "failed") {

0 commit comments

Comments
 (0)