Improve Squash & Merge ro attribute collaborators on a PR #7608

Closed
opened 2025-11-02 07:31:13 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @prologic on GitHub (Jul 20, 2021).

Basically the feature request / enhancement here is to tweak the way the "Squash & Merge" strategy works in the case of multiple authors on a PR, or one PR on top of another PR and finally merged into the main branch.

Examples of where this went wrong:

What you can see as the final commit message:

Fixes #228

Co-authored-by: James Mills prologic@shortcircuit.net.au
Reviewed-on: #229
Co-authored-by: James Mills james@mills.io
Co-committed-by: James Mills james@mills.io

What I expected to see instead (example only):

e.g: 5e4d863ab7

Use package github.com/gofrs/flock as flock implementation. (#224)

Supercesd #219 after rebasing on master after migrating off Github.

Co-authored-by: Nicolò Santamaria nicolo.santamaria@protonmail.com
Co-authored-by: James Mills prologic@shortcircuit.net.au
Co-authored-by: Tai Groot <taigrr@noreply@mills.io>
Reviewed-on: https://git.mills.io/prologic/bitcask/pulls/224
Co-authored-by: James Mills <prologic@noreply@mills.io>
Co-committed-by: James Mills <prologic@noreply@mills.io>

Originally created by @prologic on GitHub (Jul 20, 2021). Basically the feature request / enhancement here is to tweak the way the "Squash & Merge" strategy works in the case of multiple authors on a PR, or one PR on top of another PR and finally merged into the main branch. Examples of where this went wrong: - https://git.mills.io/prologic/bitcask/pulls/229 -- My initial PR - https://git.mills.io/prologic/bitcask/pulls/230 -- [taigrr](https://git.mills.io/taigrr)'s PR on top of my PR - https://git.mills.io/prologic/bitcask/commit/b094cd33d38737921e76812be510931fcba3671b -- Final commit to master. What you can see as the final commit message: > Fixes #228 > > Co-authored-by: James Mills <prologic@shortcircuit.net.au> > Reviewed-on: #229 > Co-authored-by: James Mills <james@mills.io> > Co-committed-by: James Mills <james@mills.io> What I expected to see instead (_example only_): e.g: https://git.mills.io/prologic/bitcask/commit/5e4d863ab7f46032ce211cd8fa4f57ebe53d2504 > Use package github.com/gofrs/flock as flock implementation. (#224) > > Supercesd #219 after rebasing on master after migrating off Github. > > Co-authored-by: Nicolò Santamaria <nicolo.santamaria@protonmail.com> > Co-authored-by: James Mills <prologic@shortcircuit.net.au> > Co-authored-by: Tai Groot <taigrr@noreply@mills.io> > Reviewed-on: https://git.mills.io/prologic/bitcask/pulls/224 > Co-authored-by: James Mills <prologic@noreply@mills.io> > Co-committed-by: James Mills <prologic@noreply@mills.io>
GiteaMirror added the issue/needs-feedback label 2025-11-02 07:31:13 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 21, 2021):

First of all PLEASE DO NOT JUST DELETE THE PROFORMA. It is there for a reason - so fill it out.

However, I can see that you're running 1.14.4 so at least I can try to work out what might be happening here.


Having migrated and copied the repository to my local testing instance running 1.16.0+dev-28-g28f6f7bb0 - creating the branch pre-229 at 3ff8937205c2498174d7cbd66b4fe044bc3334a0 and using fix_runGC at a902544e917bd6a9bddf8113bd70b8fe2d419733 with a PR #1 with head at fix_runGC and base at pre-229. If I attempt Squash & Merge I get the following default merge message:

fix_runGC (#1)

Fixes #228

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: Tai Groot <tai@taigrr.com>
Reviewed-on: http://localhost/gitea/administrator/bitcask/pulls/1

which translates to the commit message:

fix_runGC (#1)

Fixes #228

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: Tai Groot <tai@taigrr.com>
Reviewed-on: #1
Co-authored-by: administrator <administrator@example.com>
Co-committed-by: administrator <administrator@example.com>

Which I think is to be expected as Co-authored-by: Nicolò Santamaria nicolo.santamaria@protonmail.com does not appear in this tree.

This implies that either the issue has already been fixed in main or there is something else happening.


booting up a 1.14.3 instance shows the same result for me.


What are your [repository.pull-request] settings?

@zeripath commented on GitHub (Jul 21, 2021): First of all PLEASE DO NOT JUST DELETE THE PROFORMA. It is there for a reason - so fill it out. However, I can see that you're running 1.14.4 so at least I can try to work out what might be happening here. --- Having migrated and copied the repository to my local testing instance running 1.16.0+dev-28-g28f6f7bb0 - creating the branch pre-229 at 3ff8937205c2498174d7cbd66b4fe044bc3334a0 and using fix_runGC at a902544e917bd6a9bddf8113bd70b8fe2d419733 with a PR #1 with head at fix_runGC and base at pre-229. If I attempt Squash & Merge I get the following default merge message: ``` fix_runGC (#1) Fixes #228 Co-authored-by: James Mills <prologic@shortcircuit.net.au> Co-authored-by: Tai Groot <tai@taigrr.com> Reviewed-on: http://localhost/gitea/administrator/bitcask/pulls/1 ``` which translates to the commit message: ``` fix_runGC (#1) Fixes #228 Co-authored-by: James Mills <prologic@shortcircuit.net.au> Co-authored-by: Tai Groot <tai@taigrr.com> Reviewed-on: #1 Co-authored-by: administrator <administrator@example.com> Co-committed-by: administrator <administrator@example.com> ``` Which I think is to be expected as `Co-authored-by: Nicolò Santamaria nicolo.santamaria@protonmail.com` does not appear in this tree. This implies that either the issue has already been fixed in main or there is something else happening. --- booting up a 1.14.3 instance shows the same result for me. --- What are your `[repository.pull-request]` settings?
Author
Owner

@prologic commented on GitHub (Jul 21, 2021):

Sorry for deleting the pragman :)

if this is fixed in a later version, I should upgrade :) -- I thought I was on the latest version!

Re [repository.pull-request] I don't have such a setting in my app.ini. But I do disable Merge and Rebase in my individual projects in the GUI. I usually only leave Squash enabled.

@prologic commented on GitHub (Jul 21, 2021): Sorry for deleting the pragman :) if this is fixed in a later version, I _should_ upgrade :) -- I _thought_ I was on the latest version! Re `[repository.pull-request]` I don't have such a setting in my `app.ini`. But I do disable Merge and Rebase in my individual projects in the GUI. I usually only leave Squash enabled.
Author
Owner

@zeripath commented on GitHub (Jul 21, 2021):

You're not quite on the latest version, but my testing on 1.14.3 doesn't replicate your issue.

Do you have a custom template?

@zeripath commented on GitHub (Jul 21, 2021): You're not quite on the latest version, but my testing on 1.14.3 doesn't replicate your issue. Do you have a custom template?
Author
Owner

@prologic commented on GitHub (Jul 21, 2021):

You're not quite on the latest version, but my testing on 1.14.3 doesn't replicate your issue.

Do you have a custom template?

No I don't just standard install and squash via the GUI

@prologic commented on GitHub (Jul 21, 2021): > You're not quite on the latest version, but my testing on 1.14.3 doesn't replicate your issue. > > > > Do you have a custom template? No I don't just standard install and squash via the GUI
Author
Owner

@zeripath commented on GitHub (Jul 21, 2021):

OK so I'm having trouble replicating the issue. Are you able to replicate on try?

@zeripath commented on GitHub (Jul 21, 2021): OK so I'm having trouble replicating the issue. Are you able to replicate on try?
Author
Owner

@prologic commented on GitHub (Jul 21, 2021):

Let me upgrade to 1.16.x and I'll see what happens. Let's close this for now. Sorry :)

@prologic commented on GitHub (Jul 21, 2021): Let me upgrade to 1.16.x and I'll see what happens. Let's close this for now. Sorry :)
Author
Owner

@prologic commented on GitHub (Jul 21, 2021):

Oh I realize why I'm on 1.14.x now

There is no Docker images for 1.16.x

https://hub.docker.com/r/gitea/gitea/tags

Any change we can get some up there? Or is 1.16.x still in development?

@prologic commented on GitHub (Jul 21, 2021): Oh I realize why I'm on 1.14.x now There is no Docker images for 1.16.x https://hub.docker.com/r/gitea/gitea/tags Any change we can get some up there? Or is 1.16.x still in development?
Author
Owner

@zeripath commented on GitHub (Jul 21, 2021):

1.16 is current main. 1.15 is the next release and we have an RC out for it. 1.14.5 is the latest current release.

As I say though I couldn't replicate the issue on 1.14.3 which is weird.

@zeripath commented on GitHub (Jul 21, 2021): 1.16 is current main. 1.15 is the next release and we have an RC out for it. 1.14.5 is the latest current release. As I say though I couldn't replicate the issue on 1.14.3 which is weird.
Author
Owner

@prologic commented on GitHub (Jul 21, 2021):

No worries! THanks for your time 🙇‍♂️ I'll be sure to upgrade when the next Docker image gets tagged/pushed 👌

Gitea is great btw! 😍

@prologic commented on GitHub (Jul 21, 2021): No worries! THanks for your time 🙇‍♂️ I'll be sure to upgrade when the next Docker image gets tagged/pushed 👌 Gitea is great btw! 😍
Author
Owner

@wxiaoguang commented on GitHub (Apr 16, 2022):

Outdated, please open a new issue if there is still any problem

@wxiaoguang commented on GitHub (Apr 16, 2022): Outdated, please open a new issue if there is still any problem
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7608