go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.49k stars 5.44k forks source link

Webhook pull_request synchronize action field is synchronized, but github is synchronize #27118

Open Yiklek opened 1 year ago

Yiklek commented 1 year ago

Description

gitea: image

github: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=synchronize#pull_request

I use @octokit/webhooks. It works by listening on pull_request.synchronized, but it reports:

"pull_request.synchronized" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)

So is it possible to keep these events compatible with github?

Gitea Version

47b878858ada27fc4c74eeadcc1e467d2da90e04

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

build on 47b878858ada27fc4c74eeadcc1e467d2da90e04

Database

None

Yiklek commented 1 year ago

By the way, after a reviewer requests change, the reviewer is not removed from requested_reviewers in webhook payload. But github docs says:

Once a requested reviewer submits a review, they are no longer considered a requested reviewer.

lng2020 commented 1 year ago

By the way, after a reviewer requests change, the reviewer is not removed from requested_reviewers in webhook payload. But github docs says:

Once a requested reviewer submits a review, they are no longer considered a requested review

pr(#27104) will fix this one

Yiklek commented 1 year ago

Other issues about review:

  1. Review state in webhook payload. Github is CHANGES_REQUESTED, but gitea is REQUEST_CHANGES.
  2. Review state in webhook payload. After dismissing a review, state should be DISMISSED, but gitea does not change this field.