Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Output markdown as Step Summary and Text, and Optionally Output PR comment #35

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Kludgy4
Copy link

@Kludgy4 Kludgy4 commented Dec 4, 2024

Motivation

Warning

This is a duplicate of #34 because I've never used github fork/sync before and wiped my changes, which closed the previous PR. This is a recovery, improvement, and refiling of that PR.

Supports non-pr use cases by outputting raw markdown as output. Make "commenting" optional as well.
Always output markdown into GITHUB_STEP_SUMMARY.

From my testing the standard PR commenting behaviour appears to be unchanged when the action is triggered by a pr.

Changes

Example Use Case

Here is an example of me using this adjusted action to output markdown into a GITHUB_STEP_SUMMARY (not a comment!) before a job that requires environment-specific approval.

image

@Kludgy4 Kludgy4 force-pushed the feat/markdown-action-output branch 3 times, most recently from 952dc8f to f47b420 Compare December 4, 2024 10:55
@Kludgy4 Kludgy4 changed the title feat: Output markdown and optionally create a PR comment feat: Output markdown, Optional PR comment, and Output as Step Summary Dec 4, 2024
@Kludgy4 Kludgy4 force-pushed the feat/markdown-action-output branch 8 times, most recently from 8dff9d6 to 26a87c6 Compare December 4, 2024 11:50
@Kludgy4 Kludgy4 force-pushed the feat/markdown-action-output branch from 26a87c6 to 3ae85d4 Compare December 4, 2024 11:53
@Kludgy4 Kludgy4 marked this pull request as ready for review December 4, 2024 11:57
@Kludgy4 Kludgy4 requested a review from borchero as a code owner December 4, 2024 11:57
Only attempt commenting if in a pr context. Otherwise don't
@Kludgy4
Copy link
Author

Kludgy4 commented Dec 4, 2024

@borchero have followed up on your feedback for your review :)

@Kludgy4 Kludgy4 changed the title feat: Output markdown, Optional PR comment, and Output as Step Summary feat: Output markdown as Step Summary and Text, and Optionally Output PR comment Dec 5, 2024
Copy link
Owner

@borchero borchero left a comment

Choose a reason for hiding this comment

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

This looks great already, thank you! I left a couple suggestions :)

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
Copy link
Owner

@borchero borchero left a comment

Choose a reason for hiding this comment

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

Thank you for the updates, I think we're almost there! 🚀

One more request: could you introduce a parameter skip-comment to the action (and document it in the README)? This would allow people to only use the summary if they want and would finally allow me to fix the CI for pull requests (as forks cannot create PR comments...).

src/comment.ts Outdated Show resolved Hide resolved
src/comment.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@Kludgy4 Kludgy4 force-pushed the feat/markdown-action-output branch from a9f4dab to fe15cdf Compare January 16, 2025 21:29
@Kludgy4
Copy link
Author

Kludgy4 commented Jan 16, 2025

@borchero resolved your previous comments for you to look at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants