Post a comment on a Design Review using a markdown file as the source of the comment on AllSpice Hub using AllSpice Actions.
Add the following step to your actions:
- name: Post Comment on Design Review
uses: https://hub.allspice.io/Actions/[email protected]
with:
# The path to the markdown file containing the comment body.
comment_path: path/to/comment.md
- This action works only when used in a workflow triggered by a Design Review, as it will automatically pick up the associated design review.
- By default, successive runs of the action will edit the same comment.
- This action also reads YAML frontmatter from the markdown file to post attachments to the posted comment.
The action uses a markdown file as the source of the comment body. You can
create a markdown file in your repository and specify its path using the
comment_path
input.
Example comment.md
:
---
attachments:
- path/to/attachment1.png
- path/to/attachment2.pdf
---
# Comment Title
This is the body of the comment.
- Point 1
- Point 2
- Point 3
[Link to more information](https://example.com)
The YAML frontmatter at the beginning of the file (between ---
) can be used
to specify attachments that will be added to the comment. The YAML frontmatter
is optional, and when present, isn't included in the posted comment's body.
By default, the action will reuse the existing comment made by this action in
successive runs. This behavior can be controlled using the
reuse_existing_comment
input. Set it to 'False' if you want to create a new
comment on each run.
If you encounter any issues or need more detailed information about the
action's execution, you can set the log_level
input to 'DEBUG' for more
verbose logging.
If your instance is running on a self-signed certificate, you can tell the
action to use your certificate by setting the REQUESTS_CA_BUNDLE
environment
variable.
- name: Post Comment on Design Review
uses: https://hub.allspice.io/Actions/[email protected]
with:
comment_path: path/to/comment.md
env:
REQUESTS_CA_BUNDLE: /path/to/your/certificate.cert
For more information about AllSpice Actions and how to use them in your workflows, please refer to the AllSpice Documentation.