go-gitea/gitea

Pull Request Timeline is Wrong When Force Pushing

Closed this issue · 4 comments

Description

When having an open PR with commits already added and showing up in the "timeline", I'd expect a force push to be shown correctly in the timeline with some link to the diff of the force push.

To reproduce:

  • added two commits to a branch
  • opened a PR
  • drop the last commit
  • do a force push
  • check the timeline on the PR

This was working in earlier versions of gitea.

Reproduced on Gitea Demo Site [1]

[1] https://demo.gitea.com/smartEBL/test/pulls/1

Gitea Version

1.24.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

What I get:
Image

What I got earlier / what I would expect:
Image

Git Version

2.49.1

Operating System

Ubuntu 22.04

How are you running Gitea?

Gitea runs in a docker container using the official gitea docker image.

Database

SQLite

Any chance to fix this? It is quite annoying as it really blows up the PR history and the super useful compare feature is broken now...

The problem must have been introduced with 1.24.6 since with 1.24.5 we did not experience it. That should limit the possible root causes to [1]. Maybe it has something to do with [2] - this is more or less guessing, but this change affected the commit comments as well.

[1] https://github.com/go-gitea/gitea/milestone/185?closed=1
[2] #35443

lunny commented

Which style is the pull request? Github style or AGit style?

Which style is the pull request? Github style or AGit style?

We're following the Github style (if I understand that question correctly). Our workflow looks like follows:

  • there is only one repo with a protected branch (no forks involved)
  • developers can create own branches in this repo
  • developers can create PRs from their branches into the protected one
  • PRs are usually opened via the Gitea WebUI
  • a PR may contain multiple commits

(I tried to give a minimum example in [1] also).

[1] https://demo.gitea.com/smartEBL/test/pulls/1