Skip to content

Conversation

@mikepenz
Copy link
Owner

add job_summary_text input to include custom text in job summary

@mikepenz mikepenz requested a review from Copilot October 10, 2025 09:39
@github-actions
Copy link

github-actions bot commented Oct 10, 2025

TestsPassed ☑️SkippedFailed ❌️
Example Pytest Report4 ran2 passed0 skipped2 failed
TestResult
Example Pytest Report
test_sample.test_which_succeeds✅ passed
test_sample.test_which_fails❌ failure
test_sample.test_with_error❌ failure
test_sample.test_with_flaky_success✅ passed

@github-actions
Copy link

github-actions bot commented Oct 10, 2025

TestsPassed ☑️Skipped ⚠️Failed ❌️
Example Ungrouped Test Report | test_10.xml3 ran3 passed0 skipped0 failed
Example Ungrouped Test Report | test_11.xml3 ran2 passed0 skipped1 failed
Example Ungrouped Test Report | test_12.xml3 ran2 passed1 skipped0 failed

@github-actions
Copy link

github-actions bot commented Oct 10, 2025

TestsPassed ✅SkippedFailed
Example Nested JUnit Test Report3 ran3 passed0 skipped0 failed
TestResult
Example Nested JUnit Test Report
ABC-0199: XMPP Ping
PingIntegrationTest.pingAsync (Normal)✅ passed
PingIntegrationTest.pingServer (Normal)✅ passed
ABC-0045: Multi-User Chat
MultiUserIntegrationTest.mucRoleTestForReceivingModerator (Normal)✅ passed

Copy link
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

This PR adds a new job_summary_text input parameter that allows users to include custom text at the beginning of the job summary before the test result tables.

  • Added job_summary_text input parameter to action.yml with description and default empty value
  • Modified the attachSummary function to accept and render custom summary text when provided
  • Updated the build workflow to demonstrate the new functionality with example markdown content

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

File Description
action.yml Defines the new job_summary_text input parameter
src/main.ts Retrieves the input value and passes it to the summary function
src/annotator.ts Updates attachSummary function to handle and render custom text
.github/workflows/build.yml Adds example usage of the new parameter in the test workflow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

src/annotator.ts Outdated
): Promise<void> {
// Add summary text if provided
if (summaryText) {
await core.summary.addRaw(summaryText).write()
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

The summary is being written immediately after adding the custom text, which will create separate summary sections. This should use addRaw(summaryText) without .write() to append to the summary, then write once at the end with all other content.

Suggested change
await core.summary.addRaw(summaryText).write()
core.summary.addRaw(summaryText)

Copilot uses AI. Check for mistakes.
@mikepenz mikepenz merged commit 5c9969e into main Oct 10, 2025
7 of 13 checks passed
@mikepenz mikepenz deleted the feature/1435_2 branch October 10, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text provided with summary input is nowhere to be found

2 participants