Add co-authors of a pull request when squash-merging #4459

Closed
opened 2025-11-02 05:51:35 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @kolaente on GitHub (Dec 7, 2019).

Currently, Gitea does not add any co-authors to the commit message if there was more than one author in a pull request and the pull request is squash-merged.

I would propose to append a message like the following to the commit message text box when merging:

Co-authored-by: User <user@mail.com>

This makes it easier to see with only a git blame later who participated code in that pull request.

Originally created by @kolaente on GitHub (Dec 7, 2019). Currently, Gitea does not add any co-authors to the commit message if there was more than one author in a pull request and the pull request is squash-merged. I would propose to append a message like the following to the commit message text box when merging: ``` Co-authored-by: User <user@mail.com> ``` This makes it easier to see with only a `git blame` later who participated code in that pull request.
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 05:51:35 -06:00
Author
Owner

@shilch commented on GitHub (Dec 7, 2019):

It's a common standard for commit message trailers. Here's a list of trailers as a reference.

@shilch commented on GitHub (Dec 7, 2019): It's a common standard for commit message trailers. Here's [a list of trailers](https://git.wiki.kernel.org/index.php/CommitMessageConventions) as a reference.
Author
Owner

@shilch commented on GitHub (Dec 7, 2019):

And this is GitHub doing it.

@shilch commented on GitHub (Dec 7, 2019): And [this](https://github.blog/2018-01-29-commit-together-with-co-authors/) is GitHub doing it.
Author
Owner

@guillep2k commented on GitHub (Dec 7, 2019):

Interesting. We could add Acked-by: for approvers.

@guillep2k commented on GitHub (Dec 7, 2019): Interesting. We could add `Acked-by:` for approvers.
Author
Owner

@zeripath commented on GitHub (Dec 7, 2019):

Agreed! I wanted to add this to the signing code but realised that it was out of scope.

It does need us to consider if we're squashing if we're going to add the co authors of co authored commits we're squashing too. This means we will likely need to semi parse the commit message...

@zeripath commented on GitHub (Dec 7, 2019): Agreed! I wanted to add this to the signing code but realised that it was out of scope. It does need us to consider if we're squashing if we're going to add the co authors of co authored commits we're squashing too. This means we will likely need to semi parse the commit message...
Author
Owner

@guillep2k commented on GitHub (Dec 8, 2019):

It does need us to consider if we're squashing if we're going to add the co authors of co authored commits we're squashing too. This means we will likely need to semi parse the commit message...

Interesting. Maybe a two-step feature?

@guillep2k commented on GitHub (Dec 8, 2019): > > > It does need us to consider if we're squashing if we're going to add the co authors of co authored commits we're squashing too. This means we will likely need to semi parse the commit message... Interesting. Maybe a two-step feature?
Author
Owner

@zeripath commented on GitHub (Jan 11, 2020):

This is partially fixed by #9393 - A more complete implementation would do the following:

  • Parse the commit messages and find their Co-Authored-By trailers to add those
  • Would skip merges with the base branch and commits that are already in base branch

I if we get both of those would mean that we might have better functionality than GH

@zeripath commented on GitHub (Jan 11, 2020): This is partially fixed by #9393 - A more complete implementation would do the following: - [ ] Parse the commit messages and find their Co-Authored-By trailers to add those - [ ] Would skip merges with the base branch and commits that are already in base branch I if we get both of those would mean that we might have better functionality than GH
Author
Owner

@stale[bot] commented on GitHub (Mar 11, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Mar 11, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Mar 26, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Mar 26, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@MarcelCoding commented on GitHub (Aug 8, 2022):

Is it intended that this is always added, even If the email is the same as the actual committer email?

marcel@marcel:~/stack$ git log
commit 9a0fb7f3f710673ae391bf3d881e53fdfec06577 (HEAD -> main, origin/main, origin/HEAD)
Author: Renovate Bot <renovate-bot@noreply.git.m4rc3l.de>
Date:   Tue Aug 9 00:55:37 2022 +0200

    Configure Renovate (#3)

    Reviewed-on: https://git.m4rc3l.de/marcel/stack/pulls/3
    Co-authored-by: Renovate Bot <renovate-bot@noreply.git.m4rc3l.de>
    Co-committed-by: Renovate Bot <renovate-bot@noreply.git.m4rc3l.de>
@MarcelCoding commented on GitHub (Aug 8, 2022): Is it intended that this is always added, even If the email is the same as the actual committer email? ``` marcel@marcel:~/stack$ git log commit 9a0fb7f3f710673ae391bf3d881e53fdfec06577 (HEAD -> main, origin/main, origin/HEAD) Author: Renovate Bot <renovate-bot@noreply.git.m4rc3l.de> Date: Tue Aug 9 00:55:37 2022 +0200 Configure Renovate (#3) Reviewed-on: https://git.m4rc3l.de/marcel/stack/pulls/3 Co-authored-by: Renovate Bot <renovate-bot@noreply.git.m4rc3l.de> Co-committed-by: Renovate Bot <renovate-bot@noreply.git.m4rc3l.de> ```
Author
Owner

@Basitx72 commented on GitHub (Sep 29, 2022):

Co-authored-by: Maverick920 basitx77@gmail.com

@Basitx72 commented on GitHub (Sep 29, 2022): Co-authored-by: Maverick920 <basitx77@gmail.com>
Author
Owner

@Preetiraj3697 commented on GitHub (Nov 14, 2022):

Co-authored-by: Preetiraj3697 preetiraj122000@gmail.com

@Preetiraj3697 commented on GitHub (Nov 14, 2022): Co-authored-by: Preetiraj3697 preetiraj122000@gmail.com
Author
Owner

@ares-dev05 commented on GitHub (Feb 17, 2023):

Co-authored-by: ares9515 jamessilva1990410@gmail.com

@ares-dev05 commented on GitHub (Feb 17, 2023): Co-authored-by: ares9515 jamessilva1990410@gmail.com
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4459