Skip to content

Releases: SebastiaanZ/github-status-embed-for-discord

A few enhancements, a deprecation warning, and a bugfix

16 Dec 12:43
67f67a6
Compare
Choose a tag to compare

Enhancements

  • The action will now use values taken from the github context object as defaults for workflow-related arguments. This means that the information of the current workflow is automatically used to generate the embed, unless you specify a different value explicitly. If you want to send an embed from a workflow_run-triggered workflow, you can still provide values using github.event.workflow_run.* as usual.

  • The README now includes a recipe for using a workflow_run-triggered workflow to send a status embed for PR workflows.

Deprecation warning

  • The pull_request_payload argument will be removed in v1.0.0, as it turned out to be tricky to handle escape sequences well while passing the JSON-serialized payload as a command line argument to the Python application running in the docker container. As I haven't found a solution that I think is robust enough to include in the first major release, I'm deprecating that argument and will remove it in v1.

Bug fix

  • To make the now deprecated pull_request_payload argument work until it's removed, I've added a small bugfix to mitigate the issue with having too few backslashes in certain escape sequences (mostly sequences trying to escape a double quote). The fix is not that robust and may fail with some payloads, but I haven't found a better solution yet.

Allow specification of `debug` and `dry_run` mode as inputs

09 Dec 20:57
ac398ce
Compare
Choose a tag to compare

New in this version:

  • You can now use debug and dry_run mode in the CI by specifying them in the inputs. The debug option will increase the logging verbosity while the dry_run option will run through the entire action, but will not actually send a request to the Discord webhook.

Allow PR specification by pull_request API payload

09 Dec 20:34
8517fa6
Compare
Choose a tag to compare

New in this version

  • You are now allowed to specify your PR information using a raw pull_request payload (in JSON format). As some API endpoints return a list of PRs (e.g., list pull requests), the PR payload may be nested within an array. (Note: if the array contains multiple PR payloads, only the first will be used.)
  • The logger will now output its messages in GitHub Actions message command format. This means that logging messages will automatically be added as annotations. In production, the logger outputs very few messages (warning+), which means that annotations are only added if things don't go as planned.

Improve embed layouts and documentation

05 Dec 11:29
d1cb23c
Compare
Choose a tag to compare

For this release, I've tweaked the layout of the embeds to contain more information and less redundancy.

Changes to the embeds:

  • General workflow runs no longer include the title of the workflow in the embed title, as it was already displayed in one of the fields. This means that embeds for general workflow runs should be more likely to have a single-line title, saving vertical space:

updated_general_embed

  • PR embeds now remove the "owner" section of the owner:branch label if the PR was made from a branch in the base repository. The number of available characters for this field is now also estimated dynamically to truncate smartly based on the available space.

Changes to the documentation

  • Document that it's important to specify the webhook_id as a string to prevent problems with values too large for the integers used by GH Actions. While a number too large to fit does not break the action, it will submit the value in a float-based scientific notation, losing the exact value of the ID.

First release of GitHub Actions Status Embed for Discord

05 Dec 01:59
e0c9ea3
Compare
Choose a tag to compare

This is the first release of GitHub Actions Status Embed for Discord. You can use this action to deliver enhanced status embeds to a Discord webhook.

Please note that this is a Docker-based action and, as such, only runs on Linux runners.