Skip to content

Commit

Permalink
🪲 Fix emoji labels or messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneegans committed Oct 9, 2023
1 parent 856e1f2 commit 6f4d615
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -8,6 +8,7 @@

- **SVG Mode:** If your gist filename ends with `.svg` instead of `.json`, the action will now generate an SVG badge instead of a JSON file. This is useful if you cannot use shields.io for some reason. However, this SVG mode does not support all features of shields.io. Thanks to [@runarberg](https://github.com/runarberg) for this contribution!
- **New `host` Parameter:** You can now specify the host for the gist API. This is useful if you want to use the action on a GitHub enterprise instance. Thanks to [@LucBerge](https://github.com/LucBerge) for this idea!
- Fixed a bug which caused the gist not to be updated if the label or message of the badge contained characters which have a different encoding length in UTF8 and UTF16,
- The code has received some major refactoring. If you encounter any problems, please open an issue!
- The action now runs on Node 20 instead of Node 16.

Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -14,7 +14,7 @@ const gistUrl = new URL(core.getInput("gistID"), core.getInput("host"));
async function updateGist(body) {
const headers = new Headers([
["Content-Type", "application/json"],
["Content-Length", body.length],
["Content-Length", new TextEncoder().encode(body).length],
["User-Agent", "Schneegans"],
["Authorization", `token ${core.getInput("auth")}`],
]);
Expand Down

0 comments on commit 6f4d615

Please sign in to comment.