commit diff email notifications #620

Open
opened 2025-11-02 03:30:30 -06:00 by GiteaMirror · 29 comments
Owner

Originally created by @monnier on GitHub (Apr 7, 2017).

I cannot find any way to configure Gitea to send the diffs of every commit via email (so this is probably a feature request).

  • Gitea version (or commit ref): 1.1.0
  • Git version: 2.11
  • Operating system: GNU/Linux Debian stable
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
    • there is no https://try.gitea.io!
  • Log gist:
Originally created by @monnier on GitHub (Apr 7, 2017). I cannot find any way to configure Gitea to send the diffs of every commit via email (so this is probably a feature request). - Gitea version (or commit ref): 1.1.0 - Git version: 2.11 - Operating system: GNU/Linux Debian stable - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - [x] there is no `https://try.gitea.io`! - Log gist:
GiteaMirror added the type/featureissue/confirmed labels 2025-11-02 03:30:30 -06:00
Author
Owner

@strk commented on GitHub (Apr 7, 2017):

Git itself usually comes with scripts you can invoke from the update hook

@strk commented on GitHub (Apr 7, 2017): Git itself usually comes with scripts you can invoke from the update hook
Author
Owner

@monnier commented on GitHub (Apr 7, 2017):

But AFAIK this requires access to the Git hooks, which implies pretty much the ability to run arbitrary code as the Gitea user, so it can only be setup by the admin, basically.

@monnier commented on GitHub (Apr 7, 2017): But AFAIK this requires access to the Git hooks, which implies pretty much the ability to run arbitrary code as the Gitea user, so it can only be setup by the admin, basically.
Author
Owner

@strk commented on GitHub (Apr 7, 2017):

Yes, that's the case.
Another option is setting up webhooks to ping an external service
to do the mailing.

@strk commented on GitHub (Apr 7, 2017): Yes, that's the case. Another option is setting up webhooks to ping an external service to do the mailing.
Author
Owner

@monnier commented on GitHub (Apr 7, 2017):

Using a webhook is pretty painful, tho: it requires setting up a web service tha responds to those requests by going back to the repository (or "git fecthing" into its local copy) and redoing the work. Compared to using the Git post-receive hook, this sounds like a nightmare.

@monnier commented on GitHub (Apr 7, 2017): Using a webhook is pretty painful, tho: it requires setting up a web service tha responds to those requests by going back to the repository (or "git fecthing" into its local copy) and redoing the work. Compared to using the Git post-receive hook, this sounds like a nightmare.
Author
Owner

@stale[bot] commented on GitHub (Feb 16, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 16, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@monnier commented on GitHub (Feb 16, 2019):

Any news on this front?

@monnier commented on GitHub (Feb 16, 2019): Any news on this front?
Author
Owner

@lafriks commented on GitHub (Feb 16, 2019):

Noone is working on this currently

@lafriks commented on GitHub (Feb 16, 2019): Noone is working on this currently
Author
Owner

@stale[bot] commented on GitHub (Apr 17, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 17, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@monnier commented on GitHub (Apr 17, 2019):

Still hoping...

@monnier commented on GitHub (Apr 17, 2019): Still hoping...
Author
Owner

@ptman commented on GitHub (Apr 17, 2019):

sr.ht might have a more email-friendly approach

@ptman commented on GitHub (Apr 17, 2019): sr.ht might have a more email-friendly approach
Author
Owner

@ivptr commented on GitHub (Sep 30, 2021):

Wondering how to get email notifications for commits, containing author's details and code diffs?

They should be sent to all members having access to repository.

@ivptr commented on GitHub (Sep 30, 2021): Wondering how to get email notifications for commits, containing author's details and code diffs? They should be sent to all members having access to repository.
Author
Owner

@cbrake commented on GitHub (Sep 30, 2021):

one way to do a little better is open up pull requests, then I think commits on the PR branch trigger email notifications, but may not show diffs.

@cbrake commented on GitHub (Sep 30, 2021): one way to do a little better is open up pull requests, then I think commits on the PR branch trigger email notifications, but may not show diffs.
Author
Owner

@ivptr commented on GitHub (Sep 30, 2021):

Until this is incorporated into Gitea itself, https://github.com/git-multimail/git-multimail can be used via post-receive hook.

Here is the config to be inserted in https://github.com/git-multimail/git-multimail/blob/master/git-multimail/post-receive.example:

import os
git_multimail.Config.add_config_parameters((
	'user.name=' + str(os.environ.get('GITEA_PUSHER_NAME')),
	'user.email=' + str(os.environ.get('GITEA_PUSHER_EMAIL')),
	'multimailhook.repoName=' + str(os.environ.get('GITEA_REPO_NAME')),
	'multimailhook.mailingList=' + str(os.environ.get('GITEA_PUSHER_EMAIL')),
	'multimailhook.commitBrowseURL=' + str(os.environ.get('GITEA_ROOT_URL')) + str(os.environ.get('GITEA_REPO_USER_NAME')) + '/' + str(os.environ.get('GITEA_REPO_NAME')) + '/commit/%(id)s'
))

It still needs email addresses of all users having access to repository (collaborators, owners and its team members) per feature request #17199, to use it in multimailhook.mailingList above.

Also would be nice to use full name of user in user.name field per feature request #17198.

@ivptr commented on GitHub (Sep 30, 2021): Until this is incorporated into Gitea itself, https://github.com/git-multimail/git-multimail can be used via post-receive hook. Here is the config to be inserted in https://github.com/git-multimail/git-multimail/blob/master/git-multimail/post-receive.example: ``` import os git_multimail.Config.add_config_parameters(( 'user.name=' + str(os.environ.get('GITEA_PUSHER_NAME')), 'user.email=' + str(os.environ.get('GITEA_PUSHER_EMAIL')), 'multimailhook.repoName=' + str(os.environ.get('GITEA_REPO_NAME')), 'multimailhook.mailingList=' + str(os.environ.get('GITEA_PUSHER_EMAIL')), 'multimailhook.commitBrowseURL=' + str(os.environ.get('GITEA_ROOT_URL')) + str(os.environ.get('GITEA_REPO_USER_NAME')) + '/' + str(os.environ.get('GITEA_REPO_NAME')) + '/commit/%(id)s' )) ``` It still needs email addresses of all users having access to repository (collaborators, owners and its team members) per feature request #17199, to use it in multimailhook.mailingList above. Also would be nice to use full name of user in user.name field per feature request #17198.
Author
Owner

@wxiaoguang commented on GitHub (Oct 1, 2021):

What is the purpose of "sending the diffs of every commit via email"?

The diff can be large, hard to read, and maybe working-in-progress. I can not think about a real use case for it.

@wxiaoguang commented on GitHub (Oct 1, 2021): What is the purpose of "sending the diffs of every commit via email"? The diff can be large, hard to read, and maybe working-in-progress. I can not think about a real use case for it.
Author
Owner

@ocomsoft commented on GitHub (Oct 1, 2021):

@wxiaoguang As a manager I get an email for every commit - if the commit message is of interest I can view the email and see pretty quickly what has been done and make sure the developer is on the right track. I would find this very useful. We use a git service at the moment that does this for us and use gitea as a backup (and it has a better UI) but this is the one feature I am missing. You are tight sometimes they are hard to read and large but more of the time the commits are small and I think this feature is VERY useful.

@ocomsoft commented on GitHub (Oct 1, 2021): @wxiaoguang As a manager I get an email for every commit - if the commit message is of interest I can view the email and see pretty quickly what has been done and make sure the developer is on the right track. I would find this very useful. We use a git service at the moment that does this for us and use gitea as a backup (and it has a better UI) but this is the one feature I am missing. You are tight sometimes they are hard to read and large but more of the time the commits are small and I think this feature is VERY useful.
Author
Owner

@wxiaoguang commented on GitHub (Oct 1, 2021):

If you focus on commit messages, how about webooks?

image

@wxiaoguang commented on GitHub (Oct 1, 2021): If you focus on commit messages, how about webooks? ![image](https://user-images.githubusercontent.com/2114189/135571597-16241c18-8040-423d-981e-1145e6d51b9f.png)
Author
Owner

@ocomsoft commented on GitHub (Oct 1, 2021):

@wxiaoguang These don't let me review the code - correct me if I am wrong. I want to see the code in my Email so I can do a quick review.

@ocomsoft commented on GitHub (Oct 1, 2021): @wxiaoguang These don't let me review the code - correct me if I am wrong. I want to see the code in my Email so I can do a quick review.
Author
Owner

@cbrake commented on GitHub (Oct 1, 2021):

If you watch the repo:

image

And then for every commit, make it on a pull request:

  • git switch -C my-branch
  • git push
  • click on link to open PR
  • make changes, commit, push

Then anyone watching the repo will get emails like:

image

I highly recommend the PR flow -- it is a much better way to work with Git than everyone just pushing to master. It provides:

  • nice grouping of commits into a feature
  • easy to review a group of commits
  • promotes collaboration

The code diff is not in the email, but you can easily click on the link to view the code diff if you are interested.

I've also found commit diffs in emails useful in the past, so I think that would be a useful feature to add to gitea. Obviously, for large diffs, you would want to limit the amount in the email, but most changes (if done properly) are small and easily reviewed in an email. This is the way patches on OSS mail lists have worked for years.

@cbrake commented on GitHub (Oct 1, 2021): If you watch the repo: ![image](https://user-images.githubusercontent.com/402813/135621422-bbf6c8c4-42d8-47b2-b69d-ea84ede7cf31.png) And then for every commit, make it on a pull request: * `git switch -C my-branch` * `git push` * click on link to open PR * make changes, commit, push Then anyone watching the repo will get emails like: ![image](https://user-images.githubusercontent.com/402813/135621323-36817543-10d6-4aa0-9505-6318fccd9227.png) I highly recommend the PR flow -- it is a much better way to work with Git than everyone just pushing to master. It provides: * nice grouping of commits into a feature * easy to review a group of commits * promotes collaboration The code diff is not in the email, but you can easily click on the link to view the code diff if you are interested. I've also found commit diffs in emails useful in the past, so I think that would be a useful feature to add to gitea. Obviously, for large diffs, you would want to limit the amount in the email, but most changes (if done properly) are small and easily reviewed in an email. This is the way patches on OSS mail lists have worked for years.
Author
Owner

@ivptr commented on GitHub (Oct 2, 2021):

We are a small team and need to be notified on every commit and see a diff right away. This is extremely useful to quickly see what's going on.

Here are instructions how to achieve this using git_multimail and post-receive git hook:

  • In APP_DATA_PATH, e.g. /data/gitea put the following scripts:

https://github.com/git-multimail/git-multimail/blob/master/git-multimail/git_multimail.py
https://github.com/git-multimail/git-multimail/blob/master/git-multimail/post-receive.example

  • Rename post-receive.example to git_multimail-post-receive

  • Assign execute permission to both git_multimail.py and git_multimail-post-receive

  • Edit git_multimail-post-receive and add the following after config = git_multimail.Config('multimailhook'):

import os
git_multimail.Config.add_config_parameters((
	'user.name=' + str(os.environ.get('GITEA_PUSHER_NAME')),
	'user.email=' + str(os.environ.get('GITEA_PUSHER_EMAIL')),
	'multimailhook.repoName=' + str(os.environ.get('GITEA_REPO_NAME')),
	'multimailhook.mailingList=' + str(os.environ.get('GITEA_PUSHER_EMAIL')),
	'multimailhook.commitBrowseURL=' + str(os.environ.get('GITEA_ROOT_URL')) + str(os.environ.get('GITEA_REPO_USER_NAME')) + '/' + str(os.environ.get('GITEA_REPO_NAME')) + '/commit/%(id)s',
	'multimailhook.commitEmailFormat=html',
))
  • Softlink /data/gitea/data/gitea-repositories/username/reponame.git/hooks/post-receive.d/git_multimail-post-receive to /data/gitea/git_multimail-post-receive

On each commit you will get email like this:

commit

The only thing still needed are email addresses of all users having access to repository (collaborators, owners and its team members) per feature request #17199, to be used instead of GITEA_PUSHER_EMAIL in multimailhook.mailingList key above.

@ivptr commented on GitHub (Oct 2, 2021): We are a small team and need to be notified on every commit and see a diff right away. This is extremely useful to quickly see what's going on. Here are instructions how to achieve this using git_multimail and post-receive git hook: * In APP_DATA_PATH, e.g. /data/gitea put the following scripts: https://github.com/git-multimail/git-multimail/blob/master/git-multimail/git_multimail.py https://github.com/git-multimail/git-multimail/blob/master/git-multimail/post-receive.example * Rename post-receive.example to git_multimail-post-receive * Assign execute permission to both git_multimail.py and git_multimail-post-receive * Edit git_multimail-post-receive and add the following after `config = git_multimail.Config('multimailhook')`: ``` import os git_multimail.Config.add_config_parameters(( 'user.name=' + str(os.environ.get('GITEA_PUSHER_NAME')), 'user.email=' + str(os.environ.get('GITEA_PUSHER_EMAIL')), 'multimailhook.repoName=' + str(os.environ.get('GITEA_REPO_NAME')), 'multimailhook.mailingList=' + str(os.environ.get('GITEA_PUSHER_EMAIL')), 'multimailhook.commitBrowseURL=' + str(os.environ.get('GITEA_ROOT_URL')) + str(os.environ.get('GITEA_REPO_USER_NAME')) + '/' + str(os.environ.get('GITEA_REPO_NAME')) + '/commit/%(id)s', 'multimailhook.commitEmailFormat=html', )) ``` * Softlink /data/gitea/data/gitea-repositories/username/reponame.git/hooks/post-receive.d/git_multimail-post-receive to /data/gitea/git_multimail-post-receive On each commit you will get email like this: ![commit](https://user-images.githubusercontent.com/74856872/135724587-72f094eb-a4a0-4adf-9f8c-0928dc5d7963.png) The only thing still needed are email addresses of all users having access to repository (collaborators, owners and its team members) per feature request #17199, to be used instead of GITEA_PUSHER_EMAIL in multimailhook.mailingList key above.
Author
Owner

@strk commented on GitHub (Oct 5, 2021):

In case it is helpful: we're using git hooks to send emails
(I think via multimail but not sure).
Works fine for us, except for the fact that you have to install it
separately and have "superpowers" to setup the hook...

@strk commented on GitHub (Oct 5, 2021): In case it is helpful: we're using git hooks to send emails (I think via multimail but not sure). Works fine for us, except for the fact that you have to install it separately and have "superpowers" to setup the hook...
Author
Owner

@flucrezia commented on GitHub (Nov 7, 2022):

Hi, @ivptr, I'm trying your steps to setup emails with details inside the body for each commit.
However, I'm not able to receive any email. I'm using the Docker setup with bind mounted volume for data/, can this be a problem?
Or do you have any idea? I don't see any errors from gitea app logs.
I'm pushing on master and the symlink inside the docker container seems OK (I have created the link inside the Docker container of Gitea in order to have the correct relative path).

git@tna-internal:~/gitea/gitea$ docker exec -ti gitea bash
bash-5.1# cd data/
bash-5.1# ls -l git/repositories/tna/mos.git/hooks/post-receive.d/git_multimail-post-receive
lrwxrwxrwx    1 root     root            32 Nov  7 19:29 git/repositories/tna/mos.git/hooks/post-receive.d/git_multimail-post-receive -> gitea/git_multimail-post-receive

Thank you very much.

@flucrezia commented on GitHub (Nov 7, 2022): Hi, @ivptr, I'm trying your steps to setup emails with details inside the body for each commit. However, I'm not able to receive any email. I'm using the Docker setup with bind mounted volume for data/, can this be a problem? Or do you have any idea? I don't see any errors from gitea app logs. I'm pushing on master and the symlink inside the docker container seems OK (I have created the link _inside_ the Docker container of Gitea in order to have the correct relative path). ``` git@tna-internal:~/gitea/gitea$ docker exec -ti gitea bash bash-5.1# cd data/ bash-5.1# ls -l git/repositories/tna/mos.git/hooks/post-receive.d/git_multimail-post-receive lrwxrwxrwx 1 root root 32 Nov 7 19:29 git/repositories/tna/mos.git/hooks/post-receive.d/git_multimail-post-receive -> gitea/git_multimail-post-receive ``` Thank you very much.
Author
Owner

@ivptr commented on GitHub (Nov 7, 2022):

Haven't tried with Docker, sorry.

Maybe scripts are not being executed at all or there is some other issue.

What happens when you run ./git_multimail.py? It should display "No email recipients configured!".

When run ./git_multimail-post-receive nothing should happen, then just press Enter, it should return to the prompt.

@ivptr commented on GitHub (Nov 7, 2022): Haven't tried with Docker, sorry. Maybe scripts are not being executed at all or there is some other issue. What happens when you run ```./git_multimail.py```? It should display "No email recipients configured!". When run ```./git_multimail-post-receive``` nothing should happen, then just press Enter, it should return to the prompt.
Author
Owner

@flucrezia commented on GitHub (Nov 7, 2022):

Thank you for the quick reply, I have found indeed python was not installed on the container.

The env variables: GITEA_PUSHER_NAME, GITEA_PUSHER_EMAIL, GITEA_REPO_NAME, GITEA_REPO_USER_NAME...Are they defined by gitea automatically? Or should I define them? Because currently they are not exported within the container.

Thank you very much.

@flucrezia commented on GitHub (Nov 7, 2022): Thank you for the quick reply, I have found indeed python was not installed on the container. The env variables: GITEA_PUSHER_NAME, GITEA_PUSHER_EMAIL, GITEA_REPO_NAME, GITEA_REPO_USER_NAME...Are they defined by gitea automatically? Or should I define them? Because currently they are not exported within the container. Thank you very much.
Author
Owner

@lunny commented on GitHub (Nov 8, 2022):

I think we can at least send the email with an attched patch file.

@lunny commented on GitHub (Nov 8, 2022): I think we can at least send the email with an attched patch file.
Author
Owner

@ivptr commented on GitHub (Nov 8, 2022):

Gitea provides such env variables when calling the hook.

@ivptr commented on GitHub (Nov 8, 2022): Gitea provides such env variables when calling the hook.
Author
Owner

@flucrezia commented on GitHub (Nov 8, 2022):

Ok, I finally managed to make it work also on Gitea container. I report here in case could be useful for someone else. This follows ivptr setup instructions.

  • Install python inside the container: apk add python3
  • Make a symlink to python: ln -s /usr/bin/python3 /usr/bin/python
  • Symlinks clashes with Docker bind volumes, so I have directly copied git_multimail-post-receive inside the .../post-receive.d/ directory of the interested repo
  • Then I moved git_multimail.py into /usr/lib/python3.10 to make it available as a module
  • I used SMTP mailer instead sendmail, with Microsoft Office credentials and a specific email address used as the sender for all the emails. To make it work I had to add multimailhook.from=sameassmtpenvelopesender@domain.com

One scenario in which this turns out to be useful is when Gitea is reachable only from a private network, so it is not possible to jump from the email to Gitea outside that network.

We are a small team and need to be notified on every commit and see a diff right away. This is extremely useful to quickly see what's going on.

Here are instructions how to achieve this using git_multimail and post-receive git hook:

  • In APP_DATA_PATH, e.g. /data/gitea put the following scripts:

https://github.com/git-multimail/git-multimail/blob/master/git-multimail/git_multimail.py https://github.com/git-multimail/git-multimail/blob/master/git-multimail/post-receive.example

  • Rename post-receive.example to git_multimail-post-receive
  • Assign execute permission to both git_multimail.py and git_multimail-post-receive
  • Edit git_multimail-post-receive and add the following after config = git_multimail.Config('multimailhook'):
import os
git_multimail.Config.add_config_parameters((
	'user.name=' + str(os.environ.get('GITEA_PUSHER_NAME')),
	'user.email=' + str(os.environ.get('GITEA_PUSHER_EMAIL')),
	'multimailhook.repoName=' + str(os.environ.get('GITEA_REPO_NAME')),
	'multimailhook.mailingList=' + str(os.environ.get('GITEA_PUSHER_EMAIL')),
	'multimailhook.commitBrowseURL=' + str(os.environ.get('GITEA_ROOT_URL')) + str(os.environ.get('GITEA_REPO_USER_NAME')) + '/' + str(os.environ.get('GITEA_REPO_NAME')) + '/commit/%(id)s',
	'multimailhook.commitEmailFormat=html',
))
  • Softlink /data/gitea/data/gitea-repositories/username/reponame.git/hooks/post-receive.d/git_multimail-post-receive to /data/gitea/git_multimail-post-receive

On each commit you will get email like this:

commit

The only thing still needed are email addresses of all users having access to repository (collaborators, owners and its team members) per feature request #17199, to be used instead of GITEA_PUSHER_EMAIL in multimailhook.mailingList key above.

@flucrezia commented on GitHub (Nov 8, 2022): Ok, I finally managed to make it work also on Gitea container. I report here in case could be useful for someone else. This follows ivptr setup instructions. - Install python inside the container: `apk add python3` - Make a symlink to python: `ln -s /usr/bin/python3 /usr/bin/python` - Symlinks clashes with Docker bind volumes, so I have directly copied `git_multimail-post-receive` inside the `.../post-receive.d/` directory of the interested repo - Then I moved `git_multimail.py` into `/usr/lib/python3.10` to make it available as a module - I used SMTP mailer instead sendmail, with Microsoft Office credentials and a specific email address used as the sender for all the emails. To make it work I had to add `multimailhook.from=sameassmtpenvelopesender@domain.com` One scenario in which this turns out to be useful is when Gitea is reachable only from a private network, so it is not possible to jump from the email to Gitea outside that network. > We are a small team and need to be notified on every commit and see a diff right away. This is extremely useful to quickly see what's going on. > > Here are instructions how to achieve this using git_multimail and post-receive git hook: > > * In APP_DATA_PATH, e.g. /data/gitea put the following scripts: > > https://github.com/git-multimail/git-multimail/blob/master/git-multimail/git_multimail.py https://github.com/git-multimail/git-multimail/blob/master/git-multimail/post-receive.example > > * Rename post-receive.example to git_multimail-post-receive > * Assign execute permission to both git_multimail.py and git_multimail-post-receive > * Edit git_multimail-post-receive and add the following after `config = git_multimail.Config('multimailhook')`: > > ``` > import os > git_multimail.Config.add_config_parameters(( > 'user.name=' + str(os.environ.get('GITEA_PUSHER_NAME')), > 'user.email=' + str(os.environ.get('GITEA_PUSHER_EMAIL')), > 'multimailhook.repoName=' + str(os.environ.get('GITEA_REPO_NAME')), > 'multimailhook.mailingList=' + str(os.environ.get('GITEA_PUSHER_EMAIL')), > 'multimailhook.commitBrowseURL=' + str(os.environ.get('GITEA_ROOT_URL')) + str(os.environ.get('GITEA_REPO_USER_NAME')) + '/' + str(os.environ.get('GITEA_REPO_NAME')) + '/commit/%(id)s', > 'multimailhook.commitEmailFormat=html', > )) > ``` > > * Softlink /data/gitea/data/gitea-repositories/username/reponame.git/hooks/post-receive.d/git_multimail-post-receive to /data/gitea/git_multimail-post-receive > > On each commit you will get email like this: > > ![commit](https://user-images.githubusercontent.com/74856872/135724587-72f094eb-a4a0-4adf-9f8c-0928dc5d7963.png) > > The only thing still needed are email addresses of all users having access to repository (collaborators, owners and its team members) per feature request #17199, to be used instead of GITEA_PUSHER_EMAIL in multimailhook.mailingList key above.
Author
Owner

@adamel commented on GitHub (Feb 22, 2023):

This would be a very welcome change for us.
I would like the full commit contents of the PR to be sent to any user added as a pull request reviewer.

@adamel commented on GitHub (Feb 22, 2023): This would be a very welcome change for us. I would like the full commit contents of the PR to be sent to any user added as a pull request reviewer.
Author
Owner

@DaLynX commented on GitHub (Aug 15, 2024):

I'm interested in this feature too.

@DaLynX commented on GitHub (Aug 15, 2024): I'm interested in this feature too.
Author
Owner

@adamel commented on GitHub (Mar 12, 2025):

Using a webhook is pretty painful, tho: it requires setting up a web service tha responds to those requests by going back to the repository (or "git fecthing" into its local copy) and redoing the work. Compared to using the Git post-receive hook, this sounds like a nightmare.

Just FYI we ended upp doing this and it wasn't that painful actually - you can fetch all the commits of a pull request in git patch format using a single request to the Gitea, and more or less all meta data about the repository and PR is available in the POST-data of the webhook call.

@adamel commented on GitHub (Mar 12, 2025): > Using a webhook is pretty painful, tho: it requires setting up a web service tha responds to those requests by going back to the repository (or "git fecthing" into its local copy) and redoing the work. Compared to using the Git post-receive hook, this sounds like a nightmare. Just FYI we ended upp doing this and it wasn't that painful actually - you can fetch all the commits of a pull request in git patch format using a single request to the Gitea, and more or less all meta data about the repository and PR is available in the POST-data of the webhook call.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#620