Skip to content
Merged
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
43 changes: 42 additions & 1 deletion .github/workflows/summarize-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: "[TEST-IGNORE] Summarize Checks"

on:
workflow_run:
# todo, any others need to be added here?
workflows:
- "\\[TEST-IGNORE\\] Swagger SemanticValidation - Set Status"
- "\\[TEST-IGNORE\\] Swagger ModelValidation - Set Status"
Expand Down Expand Up @@ -50,6 +49,48 @@

# todo: add the npm install ci here for the zod usage in summarize-checks (not currently there)

- id: dump-trigger-metadata
name: Dump Trigger Metadata
uses: actions/github-script@v7
with:
script: |
console.log('=== TRIGGERING EVENT METADATA ===');
console.log(`Event name: ${context.eventName}`);
console.log(`Action: ${context.payload.action}`);

if (context.eventName === 'workflow_run' && context.payload.workflow_run) {
const run = context.payload.workflow_run;
console.log(`Triggering workflow: ${run.name}`);
console.log(`Triggering workflow ID: ${run.id}`);
console.log(`Triggering run ID: ${run.run_number}`);
console.log(`Triggering event: ${run.event}`);
console.log(`Triggering status: ${run.status}`);
console.log(`Triggering conclusion: ${run.conclusion}`);
console.log(`Triggering branch: ${run.head_branch}`);
console.log(`Triggering SHA: ${run.head_sha}`);
console.log(`Triggering actor: ${run.actor?.login || 'unknown'}`);

// Create clickable URL to the triggering workflow run
const triggeringRunUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${run.id}`;
console.log(`🔗 Triggering workflow run URL: ${triggeringRunUrl}`);

// If there's a pull request associated, show that too
if (run.pull_requests && run.pull_requests.length > 0) {
run.pull_requests.forEach(pr => {
const prUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/pull/${pr.number}`;
console.log(`🔗 Associated PR: ${prUrl}`);
});
}
} else if (context.eventName === 'pull_request_target' && context.payload.pull_request) {
const pr = context.payload.pull_request;
console.log(`PR number: ${pr.number}`);
console.log(`PR title: ${pr.title}`);
console.log(`PR state: ${pr.state}`);
console.log(`PR head SHA: ${pr.head.sha}`);
console.log(`PR base branch: ${pr.base.ref}`);
console.log(`🔗 PR URL: ${pr.html_url}`);
}

- id: summarize-checks
name: Summarize Checks
uses: actions/github-script@v7
Expand Down
Loading