Post a comment on a Design Review using a markdown file as the source of the comment on AllSpice Hub using AllSpice Actions.
Go to file
2024-11-02 08:50:06 -04:00
.github Initialize 2024-09-05 12:49:01 -07:00
.gitignore Initialize 2024-09-05 12:49:01 -07:00
action.yml Fix underscore in args 2024-09-05 13:41:00 -07:00
Dockerfile Downgrade to python 3.11 2024-09-06 09:02:28 -07:00
LICENSE.txt Initialize 2024-09-05 12:49:01 -07:00
post_dr_comment.py Add identifier to posted comment 2024-09-05 14:11:08 -07:00
README.md Initialize 2024-09-05 12:49:01 -07:00
requirements-test.txt Bump ruff from 0.6.8 to 0.7.2 2024-11-01 22:13:35 +00:00
requirements.txt Initialize 2024-09-05 12:49:01 -07:00

Post Comment on a Design Review

Post a comment on a Design Review using a markdown file as the source of the comment on AllSpice Hub using AllSpice Actions.

Usage

Add the following step to your actions:

- name: Post Comment on Design Review
  uses: https://hub.allspice.io/Actions/post-dr-comment@v0.1
  with:
    # The path to the markdown file containing the comment body.
    comment_path: path/to/comment.md

Important Notes

  1. This action works only when used in a workflow triggered by a Design Review, as it will automatically pick up the associated design review.
  2. By default, successive runs of the action will edit the same comment.
  3. This action also reads YAML frontmatter from the markdown file to post attachments to the posted comment.

Customizing the Comment Content

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.

Reusing Existing Comments

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.

Debugging

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.

SSL

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/post-dr-comment@v0.1
  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.