-
Notifications
You must be signed in 8000 to change notification settings - Fork 53
Possible to support multiple comments on a PR? #96
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
Comments
The action sets Could you share a use case for this? |
Absolutely. So I'm keen to deploy two things on each PR. Our SPA, and a Storybook instance for the code that has been changed. The reason for this is we're currently in the process of creating a new design system, so for the short term, we very likely will only have Storybook stories to review individual components. Your action works perfectly to achieve that, the only thing that we miss out on is having both environments linked to in a comment. This is our action that is making use of your action, and it would be great if we could pass through a custom
While it would be great to be able to pass options down to the underlying actions that pr-preview-actions is using, even if that's as an undocumented feature for people who "know what they're doing", in the short term, being able to control how many comments are added to a PR would be amazing |
The default comment can now be disabled as of v1.6.0 and new output parameters can be used to construct your own comment using whatever marketplace action you like. This isn't exactly what you were asking for, but it's more flexible - you could disable the default comment for both previews and use e.g. https://github.com/marocchino/sticky-pull-request-comment (or whatever action or homebrew script you like) to add a comment for each. If you wanted to reproduce the default comment as of v1.6.0: - uses: rossjrw/pr-preview-action@v1
id: preview-step
with:
comment: false
- uses: marocchino/sticky-pull-request-comment@v2.9.0
if: steps.preview-step.outputs.deployment_action == 'deploy' && env.deployment_status == 'success'
with:
header: pr-preview
message: |
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) ${{ steps.preview-step.outputs.action-version }}
:---:
| <p></p> :rocket: View preview at <br> ${{ steps.preview-step.outputs.preview-url }} <br><br>
| <h6>Built to branch [`BRANCH_NAME_HERE`](${{ github.server_url }}/${{ github.repository }}/tree/BRANCH_NAME_HERE) at ${{ steps.preview-step.outputs.action-start-time }}. <br> Preview will be ready when the [GitHub Pages deployment](${{ github.server_url }}/${{ github.repository }}/deployments) is complete. <br><br> </h6> |
I appreciate the configuration option! I do agree that this is a more flexible approach, and thank you for the template to follow to achieve the current action comment 🎉 |
The sticky-pull-request-comment action supports multiple comments on a single PR through the use of the
header
property.Is it possible to expose that functionality through pr-preview-action?
The text was updated successfully, but these errors were encountered: