Skip to content

✨ Add workflow summary step showing gate decision#316

Merged
clubanderson merged 1 commit intomainfrom
add-workflow-summary
Mar 6, 2026
Merged

✨ Add workflow summary step showing gate decision#316
clubanderson merged 1 commit intomainfrom
add-workflow-summary

Conversation

@MikeSpreitzer
Copy link
Copy Markdown
Collaborator

@MikeSpreitzer MikeSpreitzer commented Mar 3, 2026

This is part of Andy's work from PR 285. This particular piece makes the "gate" job in the E2E-on-OpenShift workflow post the job's decision in the job's "summary".

I think that this is intended to address #272, but IMO it does not actually do so.

Copilot AI review requested due to automatic review settings March 3, 2026 06:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a workflow-run summary to make the ci-e2e-openshift “gate” decision (run vs skip E2E) visible at a glance, addressing the difficulty in distinguishing “green but skipped” runs from real test executions.

Changes:

  • Adds a “Write workflow summary” step to the gate job that writes a short Markdown summary based on steps.check.outputs.should_run.

Comment on lines +245 to +248
core.summary.addRaw('**E2E tests will run** for this trigger.').write();
} else {
core.summary.addRaw('**E2E tests were skipped** (gate check did not pass for this trigger).').write();
}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core.summary.write() is async; without awaiting it, the workflow can finish the step before the summary is persisted, leading to missing/partial summaries. Use await on the .write() call in both branches (or build the summary and await core.summary.write() once).

Suggested change
core.summary.addRaw('**E2E tests will run** for this trigger.').write();
} else {
core.summary.addRaw('**E2E tests were skipped** (gate check did not pass for this trigger).').write();
}
core.summary.addRaw('**E2E tests will run** for this trigger.');
} else {
core.summary.addRaw('**E2E tests were skipped** (gate check did not pass for this trigger).');
}
await core.summary.write();

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed.


- name: Write workflow summary
if: always()
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow already uses actions/github-script v8.0.0 for the gate check step; adding a v7.0.1 invocation here introduces an unnecessary version skew (and potentially different bundled @actions/* APIs). Consider switching this step to the same pinned v8 SHA used elsewhere in the workflow for consistency and to reduce maintenance risk.

Suggested change
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

This is part of Andy's work from PR 285.

Co-Authored-By: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
@MikeSpreitzer
Copy link
Copy Markdown
Collaborator Author

Here is an example screenshot show the effect of this PR. Note the "E2E tests will run for this trigger" in the "gate summary" section at the bottom.

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Collaborator

@rubambiza rubambiza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clubanderson clubanderson merged commit 59f1dff into main Mar 6, 2026
37 checks passed
@clubanderson clubanderson deleted the add-workflow-summary branch March 6, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants