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

Wrong pull request count in a single repo #6148

Closed
2 of 7 tasks
xoxys opened this issue Feb 21, 2019 · 8 comments
Closed
2 of 7 tasks

Wrong pull request count in a single repo #6148

xoxys opened this issue Feb 21, 2019 · 8 comments

Comments

@xoxys
Copy link
Contributor

xoxys commented Feb 21, 2019

  • Gitea version (or commit ref): 1.7.2
  • Git version:
  • Operating system: CentOS 7
  • 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

I have a single repository which displays a wrong PR count. If no PR is opened, it displays -1, if one PR is opened it displays 0 and so on. All other repos work fine. If this is not a bug, how to fix this by hand?

Screenshots

image

image

@lunny lunny added the type/bug label Feb 21, 2019
@stale
Copy link

stale bot commented Apr 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 22, 2019
@xoxys
Copy link
Contributor Author

xoxys commented Apr 22, 2019

Not solved

@stale stale bot removed the issue/stale label Apr 22, 2019
@lafriks
Copy link
Member

lafriks commented Apr 22, 2019

update pr count in repositories table in sql

@xoxys
Copy link
Contributor Author

xoxys commented Apr 22, 2019

@lafriks: I'll give it a try

@richmahn
Copy link
Contributor

I had this happen with a user today. The URL is https://git.door43.org/unfoldingWord/en_ugg/pulls/95 showing a -1 for open Pull Requests, and this issue is the culprit, where it somehow closed twice. From the user:

I received an error message (500?) when I merged a change. It did not bringing up the merged successful page and the "Do you want to delete the branch" choice.
That said, it did merge the change I was making. I then went in and manually deleted the branch I merged into master. But there appears to be a problem with the merge procedure. I also note that there is a negative 1 pull request. This may also be part of the problem.

From the gitea.log:

2019/05/30 13:49:49 [...routers/repo/pull.go:943 CompareAndPullRequestPost()] [E] NewPullRequest: newIssue: Error 1062: Duplicate entry '28434-95' for key 'UQE_issue_repo_index'

Maybe tries to insert rather than update?

@lunny
Copy link
Member

lunny commented May 31, 2019

@richmahn you issue should have been fixed by my PR #6973 , but it's not back ported to v1.8

@xoxys I think this maybe caused by merging some pull request failed and panic.

@stale
Copy link

stale bot commented Jul 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Jul 30, 2019
@techknowlogick
Copy link
Member

Linked PR is merged, closing this ticket.

Please re-open if needed (after updating to latest Gitea)

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants