Skip to content

Prevent panic on merge to PR#10403

Merged
zeripath merged 2 commits into
go-gitea:masterfrom
zeripath:prevent-NPE-on-merge-to-pr
Feb 21, 2020
Merged

Prevent panic on merge to PR#10403
zeripath merged 2 commits into
go-gitea:masterfrom
zeripath:prevent-NPE-on-merge-to-pr

Conversation

@zeripath
Copy link
Copy Markdown
Contributor

If you attempt to merge to a branch which on a PR there will be a nil pointer error in the pull request checker.

This panic is uncaught and will bring down the gitea server.

This PR adds protection to prevent this.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 21, 2020
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #10403 into master will increase coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10403      +/-   ##
==========================================
+ Coverage   43.74%   43.81%   +0.06%     
==========================================
  Files         586      586              
  Lines       81113    81121       +8     
==========================================
+ Hits        35481    35540      +59     
+ Misses      41243    41188      -55     
- Partials     4389     4393       +4
Impacted Files Coverage Δ
services/pull/pull.go 36.07% <0%> (+2.13%) ⬆️
modules/git/command.go 86.95% <0%> (-2.61%) ⬇️
models/unit.go 37.03% <0%> (-2.47%) ⬇️
modules/indexer/issues/indexer.go 57.53% <0%> (-1.37%) ⬇️
models/issue_comment.go 46.5% <0%> (+0.34%) ⬆️
models/pull.go 42.37% <0%> (+0.55%) ⬆️
modules/git/repo.go 47.7% <0%> (+0.91%) ⬆️
models/review.go 42.75% <0%> (+1.48%) ⬆️
services/pull/patch.go 62.89% <0%> (+2.51%) ⬆️
services/pull/temp_repo.go 31.62% <0%> (+2.56%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfcd8e4...8fe8852. Read the comment docs.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 21, 2020
@zeripath zeripath merged commit cadec9b into go-gitea:master Feb 21, 2020
@zeripath zeripath deleted the prevent-NPE-on-merge-to-pr branch February 21, 2020 18:18
guillep2k pushed a commit to guillep2k/gitea that referenced this pull request Feb 21, 2020
If you attempt to merge to a branch which on a PR there will be a nil pointer error in the pull request checker.

This panic is uncaught and will bring down the gitea server.

This PR adds protection to prevent this.
zeripath added a commit that referenced this pull request Feb 21, 2020
If you attempt to merge to a branch which on a PR there will be a nil pointer error in the pull request checker.

This panic is uncaught and will bring down the gitea server.

This PR adds protection to prevent this.

Co-authored-by: zeripath <art27@cantab.net>
@guillep2k guillep2k added the backport/done All backports for this PR have been created label Feb 21, 2020
@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.

Labels

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants