Gitea Pull Request integration with Jenkins

Hi,

First of all I am trying to setup a Gitea webhook to run a Jenkins job when a Pull request is created to validate a PR and if the jenkins job passed continue with the merge process of the PR.

I am using:

Gitea 1.21.0 rc0
Jenkins 2.414.1

Is it possible to do that with the tools that I have and what are the steps that should I need to consider in order to implement this.

In general I am trying to implement like a pre-push hook, so I want to make sure that what we are going to merge from the PR onto the master branch won’t break our code.