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 a bug ast.Merge removes comments from SequenceNode #570

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

suzuki-shunsuke
Copy link
Contributor

Before submitting your PR, please confirm the following.

  • Describe the purpose for which you created this PR.
  • Create test code that corresponds to the modification

@suzuki-shunsuke suzuki-shunsuke marked this pull request as draft December 4, 2024 14:02
@suzuki-shunsuke
Copy link
Contributor Author

$ go test -covermode=atomic -coverprofile=coverage.txt ./ast
ok  	github.com/goccy/go-yaml/ast	0.202s	coverage: 3.9% of statements

I'm not sure how to add tests.

@suzuki-shunsuke
Copy link
Contributor Author

suzuki-shunsuke commented Dec 4, 2024

CI failed.

https://github.com/goccy/go-yaml/actions/runs/12161271332/job/33915480019?pr=570

debug - 2024-12-04 13:59:06,224 -- Report creating result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 400', params={}, description='{\"message\":\"Token required because branch is protected\"}\\n'), warnings=[], status_code=400, text='{\"message\":\"Token required because branch is protected\"}\\n')"}
error - 2024-12-04 13:59:06,224 -- Report creating failed: {"message":"Token required because branch is protected"}
Error: Codecov:
                        Failed to properly create report: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed 

Maybe this is because this is a pull request from a fork repository.

@suzuki-shunsuke suzuki-shunsuke marked this pull request as ready for review December 4, 2024 14:09
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.46%. Comparing base (5d22eed) to head (e6ff4c9).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #570   +/-   ##
=======================================
  Coverage   77.46%   77.46%           
=======================================
  Files          21       21           
  Lines        7482     7482           
=======================================
  Hits         5796     5796           
  Misses       1291     1291           
  Partials      395      395           

@goccy
Copy link
Owner

goccy commented Dec 5, 2024

Thank you for your contribution ! LGTM 👍

@goccy goccy merged commit a91fb5b into goccy:master Dec 5, 2024
19 checks passed
@suzuki-shunsuke suzuki-shunsuke deleted the fix-append-valueheadcomments branch December 5, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants