Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Handle Null Comments Result#1039

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
devinlyons wants to merge2 commits intogithub-changelog-generator:master
base:master
Choose a base branch
Loading
fromdevinlyons:fix-null-comments

Conversation

devinlyons
Copy link

This was causing issues with one of my repos. This seems to have fixed it.

@devinlyons
Copy link
Author

If this gets merged, what would it take to get a new release? I would like to updatehttps://github.com/github-changelog-generator/docker-github-changelog-generator too.

@olleolleolle
Copy link
Collaborator

@devinlyons I can see that this would fix that issue, can you figure out a test case that could go in the repo, too?

@devinlyons
Copy link
Author

@olleolleolle, my Ruby skills are a bit weak. But I did look through the tests to see if I could find an example to work from. It looks like thefetch_comments_async function is only ever mocked in the tests. I guess this makes sense given that it does a lot of IO. So, I'm not sure how to test this. The use case is something likeit does not throw an exception when a page returns no comments. Do you have any guidance on this?

@olleolleolle
Copy link
Collaborator

olleolleolle commentedFeb 9, 2024
edited
Loading

I took a look at the yield which this conditional is protecting from.

Was curious if the#iterate_pages could be made so that it didn't yield if it got a nillast_response.data (which is used inyield(last_response.data)) in#iterate_pages.

# @yield [Sawyer::Resource] An OctoKit-provided response (which can be empty)

I also couldn't see a quick way to test-drive that thing.

(This morning it dawned on me, "perhaps the data is never there, after some API change?")

@devinlyons
Copy link
Author

@olleolleolle, I updated the function so it should never yield null.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@devinlyons@olleolleolle

[8]ページ先頭

©2009-2025 Movatter.jp