Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete message text in telegram notifications (via webhook) #26371

Closed
POPSuL opened this issue Aug 7, 2023 · 0 comments · Fixed by #26401
Closed

Incomplete message text in telegram notifications (via webhook) #26371

POPSuL opened this issue Aug 7, 2023 · 0 comments · Fixed by #26401
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@POPSuL
Copy link
Contributor

POPSuL commented Aug 7, 2023

Description

I have telegram webhook for all events from * branches.
If I assign someone to review a pull request, I receive message by popsul (where popsul is link to my gitea page).
In the resent deliveries I see next (sensitive data was hidden):

Request:

Request URL: https://api.telegram.org/bot***/sendMessage?chat_id=-***
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: ee2c1c0c-8b51-4bc5-8e7c-bc47a4527178
X-GitHub-Event: pull_request
X-GitHub-Event-Type: pull_request_review_request
X-Gitea-Delivery: ee2c1c0c-8b51-4bc5-8e7c-bc47a4527178
X-Gitea-Event: pull_request
X-Gitea-Event-Type: pull_request_review_request
X-Gitea-Signature: 
X-Gogs-Delivery: ee2c1c0c-8b51-4bc5-8e7c-bc47a4527178
X-Gogs-Event: pull_request
X-Gogs-Event-Type: pull_request_review_request
X-Gogs-Signature: 
X-Hub-Signature: sha1=
X-Hub-Signature-256: sha256=

Content:

{
  "text": "by \u003ca href=\"https://***/popsul\" rel=\"nofollow\"\u003epopsul\u003c/a\u003e",
  "parse_mode": "HTML",
  "disable_web_page_preview": true
}

Gitea Version

1.20.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

CentOS 8, self hosted.
Gitea binary from github releases page.
Started via systemd:

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
# If you want to bind Gitea to a port below 1024 uncomment
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

Database

MySQL

@POPSuL POPSuL added the type/bug label Aug 7, 2023
@yardenshoham yardenshoham added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Aug 8, 2023
silverwind pushed a commit that referenced this issue Aug 9, 2023
Add webhook events for pull request review requests

- Fixes #26371
- Added support for the "Pull request review requested" and "Pull
request review request removed" webhook events.
- Updated the `getPullRequestPayloadInfo` function in `general.go` to
handle these new webhook events.

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/bd942971-fb1d-40f3-8961-46638e3588fa)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/216e9c7d-0a4d-49f9-8492-2d14c88bbf4e)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Aug 9, 2023
Add webhook events for pull request review requests

- Fixes go-gitea#26371
- Added support for the "Pull request review requested" and "Pull
request review request removed" webhook events.
- Updated the `getPullRequestPayloadInfo` function in `general.go` to
handle these new webhook events.

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/bd942971-fb1d-40f3-8961-46638e3588fa)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/216e9c7d-0a4d-49f9-8492-2d14c88bbf4e)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
silverwind pushed a commit that referenced this issue Aug 9, 2023
Backport #26401 by @yardenshoham

Add webhook events for pull request review requests

- Fixes #26371
- Added support for the "Pull request review requested" and "Pull
request review request removed" webhook events.
- Updated the `getPullRequestPayloadInfo` function in `general.go` to
handle these new webhook events.

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/bd942971-fb1d-40f3-8961-46638e3588fa)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/216e9c7d-0a4d-49f9-8492-2d14c88bbf4e)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants