Skip to content

Upgrading from v0.1.1 to v1.0.0 brings some breaking change(s) with tg markdown syntax parsing #66

@rc5hack

Description

@rc5hack

I used to include telegram-action into my Github workflows in that manner:

uses: appleboy/telegram-action@master

Some weeks ago I noticed that my Github actions workflows stopped to send notifications to telegram.

While investigating, I found that telegram-action was updated some time ago.

By replacing uses: appleboy/telegram-action@master with uses: appleboy/telegram-action@v1.0.0 and uses: appleboy/telegram-action@v0.1.1 I discovered, that my workflow works fine on v0.1.1 and don't work with v1.0.0.

With v1.0.0 I get an error

Bad Request: can't parse entities: Can't find end of the entity starting at byte offset X

Full log:

Run appleboy/telegram-action@v1.0.0
/usr/bin/docker run --name abf7cbeade0e989d2e44e0a7f8777307a3225d_abb92c --label abf7cb --workdir /github/workspace --rm 
-e "AUTODEPLOY_STATUS" 
-e "AUTODEPLOY_STATUS_EMODJI" 
-e "AUTODEPLOY_MESSAGE" 
-e "LOGSARCHIVE_ZIP" 
-e "INPUT_TO" 
-e "INPUT_TOKEN" 
-e "INPUT_DISABLE_WEB_PAGE_PREVIEW" 
-e "INPUT_DOCUMENT" 
-e "INPUT_FORMAT" 
-e "INPUT_MESSAGE" 
-e "INPUT_MESSAGE_FILE" 
-e "INPUT_SOCKS5" 
-e "INPUT_PHOTO" 
-e "INPUT_STICKER" 
-e "INPUT_AUDIO" 
-e "INPUT_VOICE" 
-e "INPUT_LOCATION" 
-e "INPUT_VENUE" 
-e "INPUT_VIDEO" 
-e "INPUT_DEBUG" 
-e "INPUT_DISABLE_NOTIFICATION" 
-e "HOME" 
-e "GITHUB_JOB" 
-e "GITHUB_REF" 
-e "GITHUB_SHA" 
-e "GITHUB_REPOSITORY" 
-e "GITHUB_REPOSITORY_OWNER" 
-e "GITHUB_REPOSITORY_OWNER_ID" 
-e "GITHUB_RUN_ID" 
-e "GITHUB_RUN_NUMBER" 
-e "GITHUB_RETENTION_DAYS" 
-e "GITHUB_RUN_ATTEMPT" 
-e "GITHUB_REPOSITORY_ID" 
-e "GITHUB_ACTOR_ID" 
-e "GITHUB_ACTOR" 
-e "GITHUB_TRIGGERING_ACTOR" 
-e "GITHUB_WORKFLOW" 
-e "GITHUB_HEAD_REF" 
-e "GITHUB_BASE_REF" 
-e "GITHUB_EVENT_NAME" 
-e "GITHUB_SERVER_URL" 
-e "GITHUB_API_URL" 
-e "GITHUB_GRAPHQL_URL" 
-e "GITHUB_REF_NAME" 
-e "GITHUB_REF_PROTECTED" 
-e "GITHUB_REF_TYPE" 
-e "GITHUB_WORKFLOW_REF" 
-e "GITHUB_WORKFLOW_SHA" 
-e "GITHUB_WORKSPACE" 
-e "GITHUB_ACTION" 
-e "GITHUB_EVENT_PATH" 
-e "GITHUB_ACTION_REPOSITORY" 
-e "GITHUB_ACTION_REF" 
-e "GITHUB_PATH" 
-e "GITHUB_ENV" 
-e "GITHUB_STEP_SUMMARY" 
-e "GITHUB_STATE" 
-e "GITHUB_OUTPUT" 
-e "RUNNER_OS" 
-e "RUNNER_ARCH" 
-e "RUNNER_NAME" 
-e "RUNNER_ENVIRONMENT" 
-e "RUNNER_TOOL_CACHE" 
-e "RUNNER_TEMP" 
-e "RUNNER_WORKSPACE" 
-e "ACTIONS_RUNTIME_URL" 
-e "ACTIONS_RUNTIME_TOKEN" 
-e "ACTIONS_CACHE_URL" 
-e "ACTIONS_RESULTS_URL" 
-e GITHUB_ACTIONS=true 
-e CI=true 
-v "/var/run/docker.sock":"/var/run/docker.sock" 
-v "/opt/gh-actions-runner/_work/_temp/_github_home":"/github/home" 
-v "/opt/gh-actions-runner/_work/_temp/_github_workflow":"/github/workflow" 
-v "/opt/gh-actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" 
-v "/opt/gh-actions-runner/_work/MyRepoName/MyRepoName":"/github/workspace" 
abf7cb:eade0e989d2e44e0a7f8777307a3225d
2024/10/16 08:02:01 Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 646

With v0.1.1 everything is OK:

Run appleboy/telegram-action@v0.1.1
/usr/bin/docker run --name abf7cb8e043a5cd9ae4b4aa2762e81f7f95610_483edf --label abf7cb --workdir /github/workspace --rm 
-e "AUTODEPLOY_STATUS" 
-e "AUTODEPLOY_STATUS_EMODJI" 
-e "AUTODEPLOY_MESSAGE" 
-e "LOGSARCHIVE_ZIP" 
-e "INPUT_TO" 
-e "INPUT_TOKEN" 
-e "INPUT_DISABLE_WEB_PAGE_PREVIEW" 
-e "INPUT_DOCUMENT" 
-e "INPUT_FORMAT" 
-e "INPUT_MESSAGE" 
-e "INPUT_MESSAGE_FILE" 
-e "INPUT_SOCKS5" 
-e "INPUT_PHOTO" 
-e "INPUT_STICKER" 
-e "INPUT_AUDIO" 
-e "INPUT_VOICE" 
-e "INPUT_LOCATION" 
-e "INPUT_VENUE" 
-e "INPUT_VIDEO" 
-e "INPUT_DEBUG" 
-e "INPUT_DISABLE_NOTIFICATION" 
-e "HOME" 
-e "GITHUB_JOB" 
-e "GITHUB_REF" 
-e "GITHUB_SHA" 
-e "GITHUB_REPOSITORY" 
-e "GITHUB_REPOSITORY_OWNER" 
-e "GITHUB_REPOSITORY_OWNER_ID" 
-e "GITHUB_RUN_ID" 
-e "GITHUB_RUN_NUMBER" 
-e "GITHUB_RETENTION_DAYS" 
-e "GITHUB_RUN_ATTEMPT" 
-e "GITHUB_REPOSITORY_ID" 
-e "GITHUB_ACTOR_ID" 
-e "GITHUB_ACTOR" 
-e "GITHUB_TRIGGERING_ACTOR" 
-e "GITHUB_WORKFLOW" 
-e "GITHUB_HEAD_REF" 
-e "GITHUB_BASE_REF" 
-e "GITHUB_EVENT_NAME" 
-e "GITHUB_SERVER_URL" 
-e "GITHUB_API_URL" 
-e "GITHUB_GRAPHQL_URL" 
-e "GITHUB_REF_NAME" 
-e "GITHUB_REF_PROTECTED" 
-e "GITHUB_REF_TYPE" 
-e "GITHUB_WORKFLOW_REF" 
-e "GITHUB_WORKFLOW_SHA" 
-e "GITHUB_WORKSPACE" 
-e "GITHUB_ACTION" 
-e "GITHUB_EVENT_PATH" 
-e "GITHUB_ACTION_REPOSITORY" 
-e "GITHUB_ACTION_REF" 
-e "GITHUB_PATH" 
-e "GITHUB_ENV" 
-e "GITHUB_STEP_SUMMARY" 
-e "GITHUB_STATE" 
-e "GITHUB_OUTPUT" 
-e "RUNNER_OS" 
-e "RUNNER_ARCH" 
-e "RUNNER_NAME" 
-e "RUNNER_ENVIRONMENT" 
-e "RUNNER_TOOL_CACHE" 
-e "RUNNER_TEMP" 
-e "RUNNER_WORKSPACE" 
-e "ACTIONS_RUNTIME_URL" 
-e "ACTIONS_RUNTIME_TOKEN" 
-e "ACTIONS_CACHE_URL" 
-e "ACTIONS_RESULTS_URL" 
-e GITHUB_ACTIONS=true 
-e CI=true 
-v "/var/run/docker.sock":"/var/run/docker.sock" 
-v "/opt/gh-actions-runner/_work/_temp/_github_home":"/github/home" 
-v "/opt/gh-actions-runner/_work/_temp/_github_workflow":"/github/workflow" 
-v "/opt/gh-actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" 
-v "/opt/gh-actions-runner/_work/MyRepoName/MyRepoName":"/github/workspace" 
abf7cb:8e043a5cd9ae4b4aa2762e81f7f95610

The messages I'm sending via workflow are exactly the same in both cases (only commit SHA differs).

Has anything changed in the way telegram-action parses tg markdown syntax in messages after upgrading from v0.1.1 to v1.0.0?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions