Skip to content

Fix incorrect comment diff hunk parsing, fix github asset ID nil panic #35046

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

Merged
merged 6 commits into from
Jul 11, 2025

Conversation

lunny
Copy link
Member

@lunny lunny commented Jul 11, 2025

@lunny lunny added type/bug backport/v1.24 This PR should be backported to Gitea 1.24 labels Jul 11, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 11, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Jul 11, 2025
@lunny lunny requested a review from mrsdizzie July 11, 2025 04:39
@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 Jul 11, 2025
@lunny lunny changed the title Fix a bug that the code diff hunk missing one at Fix a bug that the code diff hunk missing one @ Jul 11, 2025
Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, some test coverage for this would be nice.

@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 Jul 11, 2025
@wxiaoguang wxiaoguang marked this pull request as draft July 11, 2025 08:12
@wxiaoguang
Copy link
Contributor

This one: Fix git diff hunk 0 based start line #35047

why not fix together .....

@wxiaoguang wxiaoguang changed the title Fix a bug that the code diff hunk missing one @ Fix incorrect git diff hunk parsing, fix github asset ID nil panic Jul 11, 2025
@wxiaoguang wxiaoguang marked this pull request as ready for review July 11, 2025 16:38
@wxiaoguang wxiaoguang force-pushed the lunny/fix_hunk_missing_at branch 2 times, most recently from 17d5d1d to 828a77f Compare July 11, 2025 17:01
@wxiaoguang wxiaoguang changed the title Fix incorrect git diff hunk parsing, fix github asset ID nil panic Fix incorrect comment diff hunk parsing, fix github asset ID nil panic Jul 11, 2025
@wxiaoguang wxiaoguang added this to the 1.25.0 milestone Jul 11, 2025
@wxiaoguang wxiaoguang added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 11, 2025
@lunny lunny merged commit 1352080 into go-gitea:main Jul 11, 2025
26 checks passed
@lunny lunny deleted the lunny/fix_hunk_missing_at branch July 11, 2025 22:18
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 11, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jul 12, 2025
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Jul 12, 2025
wxiaoguang added a commit that referenced this pull request Jul 12, 2025
#35046) (#35055)

Backport #35046 by lunny

* Fix missing the first char when parsing diff hunk header
* Fix #35040
* Fix #35049

---------

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 14, 2025
* giteaofficial/main:
  Refactor view issue & comment list styles (go-gitea#35061)
  Fix user's sign email check (go-gitea#35045)
  [skip ci] Updated translations via Crowdin
  Fix incorrect comment diff hunk parsing, fix github asset ID nil panic (go-gitea#35046)
  Add Notifications section in User Settings (go-gitea#35008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code type/bug
Projects
None yet
4 participants