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 incorrect review comment diffs #14002

Merged
merged 2 commits into from
Dec 16, 2020

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented Dec 15, 2020

Fixes #13683.

The diff snippet that provides context for a code review comment on the pull request timeline page used to be calculated based on the headCommitID. But in 1.13, with PR #13448, this changed to the commitID from the blame for the commented line, which seems to cause these incorrect review comment diff snippets.

This PR reverts back to using the headCommitID for obtaining the diff.

@codecov-io
Copy link

codecov-io commented Dec 15, 2020

Codecov Report

Merging #14002 (16301f2) into master (88b585c) will decrease coverage by 0.02%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14002      +/-   ##
==========================================
- Coverage   42.22%   42.20%   -0.03%     
==========================================
  Files         710      710              
  Lines       77258    77259       +1     
==========================================
- Hits        32626    32610      -16     
- Misses      39268    39271       +3     
- Partials     5364     5378      +14     
Impacted Files Coverage Δ
services/pull/review.go 51.07% <33.33%> (+0.35%) ⬆️
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/queue/unique_queue_channel.go 58.06% <0.00%> (-6.46%) ⬇️
modules/notification/ui/ui.go 93.05% <0.00%> (-2.78%) ⬇️
services/pull/check.go 49.63% <0.00%> (-1.46%) ⬇️
models/notification.go 66.25% <0.00%> (-0.99%) ⬇️
models/error.go 38.49% <0.00%> (-0.82%) ⬇️
models/issue_comment.go 52.26% <0.00%> (-0.46%) ⬇️
modules/notification/mail/mail.go 39.08% <0.00%> (ø)
services/mailer/mail.go 61.29% <0.00%> (+1.07%) ⬆️
... and 1 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 88b585c...16301f2. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 15, 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 Dec 15, 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 Dec 16, 2020
@lafriks lafriks merged commit e7a77d3 into go-gitea:master Dec 16, 2020
@lafriks lafriks added the backport/done All backports for this PR have been created label Dec 16, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
@jpraet jpraet deleted the 13683-comment-diff-bug branch January 22, 2021 18:38
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.

Comments for PR are in the wrong spot on the main page.
7 participants