[PR #1989] [MERGED] Fix fast-forward PR bug #16163

Closed
opened 2025-11-02 12:03:43 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1989
Author: @ethantkoenig
Created: 6/16/2017
Status: Merged
Merged: 6/22/2017
Merged by: @lunny

Base: masterHead: fix/merge_pr


📝 Commits (1)

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 models/pull.go (+3 -3)

📄 Description

Fixes #1186 and #1964.

If a PR is fast-forwarded, use the last commit of the PR as the "merge commit".

This ignores a more subtle problem, which is that we determine the "merger" of a PR by the author of the "merge commit", not by the user who actually pushed that commit to origin (which is how Github does it). Fixing this would require a much larger refactor, so for now I decided to just do a quick fix for the more glaring problem.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1989 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 6/16/2017 **Status:** ✅ Merged **Merged:** 6/22/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/merge_pr` --- ### 📝 Commits (1) - [`2f83a8c`](https://github.com/go-gitea/gitea/commit/2f83a8c6a26c308d561deabeebde61b009c0c9d4) Fix fast-forward PR bug ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `models/pull.go` (+3 -3) </details> ### 📄 Description Fixes #1186 and #1964. If a PR is fast-forwarded, use the last commit of the PR as the "merge commit". This ignores a more subtle problem, which is that we determine the "merger" of a PR by the author of the "merge commit", not by the user who actually pushed that commit to origin (which is how Github does it). Fixing this would require a much larger refactor, so for now I decided to just do a quick fix for the more glaring problem. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:03:43 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16163