Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate headlines in commit message after pull merge #12365

Closed
1 of 7 tasks
typeless opened this issue Jul 29, 2020 · 5 comments · Fixed by #13071
Closed
1 of 7 tasks

Duplicate headlines in commit message after pull merge #12365

typeless opened this issue Jul 29, 2020 · 5 comments · Fixed by #13071
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/stale

Comments

@typeless
Copy link
Contributor

  • Gitea version (or commit ref):
    1.13.0+dev-258-g8f489131f

  • Git version:
    2.26.2

  • Operating system:
    x86_64 GNU/Linux synology_avoton_1817+

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

image

As you can see, the headline Upgrade mtd-utils to 2.1.2 for UBIFS authentication is repeated.
It's okay to remove it manually. But the UX would be nicer if no such step is required.
...

@typeless typeless changed the title Duplicate headlines in commit message decorated by pull merge Duplicate headlines in commit message after pull merge Jul 29, 2020
@typeless
Copy link
Contributor Author

The message shown in the snapshot is a merge-by-squash pull.

It seems that the current behavior makes sense under most circumstances like when the PR has a title independent of the individual commits. Probably manually removing the repeated lines is the best way one can do?

If there is any good idea to improve, I can give it a look.

@silverwind
Copy link
Member

GitHub also has this issue. It may actually be a side effect of git squashing, not sure.

@typeless
Copy link
Contributor Author

@silverwind hmm, if Github has the same issue and no one complains about it, it’s probably good enough for most people.

Let me see if there is any possible improvement.

@zeripath
Copy link
Contributor

Tbh I've been thinking about this and I think the way GitHub and Gitea do this is incorrect. We really should be offering the content of the PRs headline comment as the commit comment instead of the git commits.

The PR headline is the description of what this PR does - therefore it's what the squash commit should have as its comment.

@stale
Copy link

stale bot commented Oct 4, 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 stale bot added the issue/stale label Oct 4, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Oct 5, 2020
typeless added a commit to typeless/gitea that referenced this issue Dec 10, 2020
Originally, it was filled by the commit messages of the involved
commits. In this change, we use the headline comment of the pull
request as the commit message when it is a squash merge.

Thanks to @zeripath for suggesting the idea.

Fixes go-gitea#12365
6543 pushed a commit that referenced this issue Dec 21, 2020
Originally, it was filled by the commit messages of the involved
commits. In this change, we use the headline comment of the pull
request as the commit message when it is a squash merge.

Thanks to @zeripath for suggesting the idea.

Fixes #12365

Co-authored-by: Mura Li <typeless@users.noreply.github.com>
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented issue/stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants