paged loop forever when used with repos.get_commit

Open
#98 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
github, python
Domain
api

Research direction

Reproduce the issue with the provided GhApi, repos.get_commit, and paged snippet, then trace the paged entry point and how it handles the commit response. No source file or test is named in the report. Done means the iterator terminates for a commit request instead of yielding the same page forever, with a regression test covering that call.

Written by the indexing model from the issue text.

Description

The following code will loop forever:

api = GhApi(owner="fastai", repo="ghapi", token=os.environ["GH_TOKEN"])
pages = paged(api.repos.get_commit, "d8fb5c28e14f4bcbb0691e71b4ef7d55228a81ac")
for page in pages:
    print("foo")
foo
foo
foo

Whatever the commit I target, I got the same behavior.

I’m doing something wrong, or it’s a real bug?

Dominant language
Python
Stars
687
Forks
69
Avg merge
1m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AnswerDotAI/ghapi

All issues in AnswerDotAI/ghapi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.