Skip to content

Commit a62d2e0

Browse files
committed
Fix #229: Add even more verbose logging for polling loop
1 parent 0b5c87d commit a62d2e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/commands/triggerWorkflowRun.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,20 @@ export function registerTriggerWorkflowRun(context: vscode.ExtensionContext, sto
175175
title: "Waiting for workflow run to start..."
176176
},
177177
async () => {
178+
log("Starting loop to check for new workflow run...");
178179
for (let i = 0; i < 20; i++) {
179180
await new Promise(resolve => setTimeout(resolve, 1000));
180181
try {
182+
log(`Checking for new run (attempt ${i + 1}/20)...`);
181183
const result = await gitHubRepoContext.client.actions.listWorkflowRuns({
182184
owner: gitHubRepoContext.owner,
183185
repo: gitHubRepoContext.name,
184-
workflow_id: workflowIdForApi!,
186+
workflow_id: workflowIdForApi!,
185187
per_page: 1
186188
});
187189
const newLatestRunId = result.data.workflow_runs[0]?.id;
190+
log(`Latest run ID found: ${newLatestRunId} (Previous: ${latestRunId})`);
191+
188192
if (newLatestRunId && newLatestRunId !== latestRunId) {
189193
log(`Found new workflow run: ${newLatestRunId}. Triggering refresh and polling.`);
190194
await vscode.commands.executeCommand("github-actions.explorer.refresh");

0 commit comments

Comments
 (0)