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

Fix bug of get context user #17169

Merged
merged 2 commits into from Sep 28, 2021
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Sep 28, 2021

Partially fix #17163

@lunny lunny added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. backport/v1.15 labels Sep 28, 2021
@lunny lunny added this to the 1.16.0 milestone Sep 28, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Sep 28, 2021
@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 Sep 28, 2021
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 28, 2021

Should we replace all legacy GetAPIContext with this new one

Should we make GetAPIContext nil-safe?

@codecov-commenter
Copy link

Codecov Report

Merging #17169 (22d2a9b) into main (a82c799) will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17169      +/-   ##
==========================================
+ Coverage   45.29%   45.31%   +0.01%     
==========================================
  Files         778      778              
  Lines       87194    87195       +1     
==========================================
+ Hits        39496    39511      +15     
+ Misses      41283    41276       -7     
+ Partials     6415     6408       -7     
Impacted Files Coverage Δ
modules/context/context.go 59.16% <0.00%> (-0.89%) ⬇️
routers/web/base.go 18.00% <0.00%> (+0.85%) ⬆️
modules/git/repo_base_nogogit.go 82.85% <0.00%> (-2.86%) ⬇️
modules/git/utils.go 68.05% <0.00%> (-2.78%) ⬇️
modules/queue/queue_channel.go 95.00% <0.00%> (-1.67%) ⬇️
models/issue_comment.go 51.61% <0.00%> (-0.30%) ⬇️
services/pull/pull.go 42.19% <0.00%> (+0.40%) ⬆️
routers/api/v1/repo/pull.go 29.50% <0.00%> (+0.51%) ⬆️
modules/queue/queue_bytefifo.go 59.88% <0.00%> (+0.59%) ⬆️
models/repo_list.go 78.43% <0.00%> (+0.78%) ⬆️
... 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 a82c799...22d2a9b. Read the comment docs.

@lunny lunny merged commit 37b2931 into go-gitea:main Sep 28, 2021
@lunny lunny deleted the lunny/fix_get_context_user branch September 28, 2021 13:13
lunny added a commit to lunny/gitea that referenced this pull request Sep 28, 2021
Co-authored-by: 6543 <6543@obermui.de>
6543 added a commit that referenced this pull request Sep 28, 2021
Co-authored-by: 6543 <6543@obermui.de>
@6543 6543 added the backport/done All backports for this PR have been created label Sep 28, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal Server Error /pulls runtime error: invalid memory address or nil pointer dereference
6 participants