Merging pull request causes 500 error. #3670

Closed
opened 2025-11-02 05:21:16 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @PershingSquare on GitHub (Jul 25, 2019).

Description

Every time I try to merge a pull request, I get a 500 server error. I have branch protection on master, with 1 approval required before merging.

Screenshots

what_the_page_looks_like

Originally created by @PershingSquare on GitHub (Jul 25, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.10.0+dev-67-ge0d6d2f97 - Git version: 2.7.4, Git LFS 2.7.2 - Operating system: Alpine Linux v3.10 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No, our repo use git-lfs and I wasn't able to reproduce it on there. - [ ] Not relevant - Log gist: https://gist.github.com/PershingSquare/68118d48e13a082a749870cfa3a5e7cc ## Description Every time I try to merge a pull request, I get a 500 server error. I have branch protection on master, with 1 approval required before merging. ## Screenshots ![what_the_page_looks_like](https://user-images.githubusercontent.com/39250540/61876343-7d7fb580-aea1-11e9-9ba2-56aec8b0b627.PNG) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the type/bug label 2025-11-02 05:21:16 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 25, 2019):

OK so looking at the gitea.log you've sent it appears that the panic is being caused at line 104 here:

734aa96508/models/branches.go (L102-L108)

This is in turn called from:

734aa96508/models/branches.go (L94-L100)

Which is from line 99 here:

734aa96508/routers/private/hook.go (L89-L105)

@zeripath commented on GitHub (Jul 25, 2019): OK so looking at the gitea.log you've sent it appears that the panic is being caused at line 104 here: https://github.com/go-gitea/gitea/blob/734aa965088fb72330f4ad744c187c614cce3d8b/models/branches.go#L102-L108 This is in turn called from: https://github.com/go-gitea/gitea/blob/734aa965088fb72330f4ad744c187c614cce3d8b/models/branches.go#L94-L100 Which is from line 99 here: https://github.com/go-gitea/gitea/blob/734aa965088fb72330f4ad744c187c614cce3d8b/routers/private/hook.go#L89-L105
Author
Owner

@zeripath commented on GitHub (Jul 25, 2019):

Now that means that either pr is nil here, or pr.Issue is nil.

@zeripath commented on GitHub (Jul 25, 2019): Now that means that either `pr` is nil here, or `pr.Issue` is nil.
Author
Owner

@zeripath commented on GitHub (Jul 25, 2019):

OK, simple fix is to change pr.Issue.ID to pr.IssueID. However, when merging it shouldn't be pushing all of the branches so I'll look at that too.

@zeripath commented on GitHub (Jul 25, 2019): OK, simple fix is to change `pr.Issue.ID` to `pr.IssueID`. However, when merging it shouldn't be pushing all of the branches so I'll look at that too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3670