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

Prevent nil pointer in GetPullRequestCommitStatusState #10342

Conversation

zeripath
Copy link
Contributor

Ensure that pr.HeadRepo is loaded before using it in GetPullRequestCommitStatusState.

Fixes error on merging with successful commit merge statuses.

@zeripath zeripath added this to the 1.12.0 milestone Feb 18, 2020
@zeripath zeripath added the issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP label Feb 18, 2020
@codecov-io
Copy link

codecov-io commented Feb 18, 2020

Codecov Report

Merging #10342 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10342      +/-   ##
==========================================
+ Coverage   43.69%   43.74%   +0.04%     
==========================================
  Files         585      585              
  Lines       81019    81019              
==========================================
+ Hits        35401    35440      +39     
+ Misses      41230    41185      -45     
- Partials     4388     4394       +6
Impacted Files Coverage Δ
models/unit.go 37.03% <0%> (-2.47%) ⬇️
modules/queue/unique_queue_disk_channel.go 53.84% <0%> (-1.93%) ⬇️
models/error.go 30.95% <0%> (+0.54%) ⬆️
models/pull.go 42.37% <0%> (+0.55%) ⬆️
services/pull/patch.go 62.89% <0%> (+2.51%) ⬆️
services/pull/temp_repo.go 31.62% <0%> (+2.56%) ⬆️
services/pull/check.go 53.04% <0%> (+18.9%) ⬆️

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 6e467ac...f5cf9cd. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 18, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 18, 2020
@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 18, 2020
@zeripath zeripath merged commit 13c6681 into go-gitea:master Feb 18, 2020
@zeripath zeripath deleted the fix-nil-pointer-getpullrequrestcommitstatusstate branch February 18, 2020 19:34
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 18, 2020
Ensure that pr.HeadRepo is loaded before using it in GetPullRequestCommitStatusState.

Fixes error on merging with successful commit merge statuses.
@zeripath zeripath added the backport/done All backports for this PR have been created label Feb 18, 2020
zeripath added a commit that referenced this pull request Feb 18, 2020
Backport #10344 

Ensure that pr.HeadRepo is loaded before using it in GetPullRequestCommitStatusState.

Fixes error on merging with successful commit merge statuses.
@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 issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP 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.

6 participants