`--per-page N` to get all students fails for large N

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github, go
Domain
api, cli

Research direction

Start by reproducing gh classroom clone student-repos --per-page 199 and trace the clone student-repos entry point that builds the accepted_assignments request. Done means cohorts over 100 no longer return HTTP 500 and the command can clone all requested students, with pulling included if that remains in scope.

Written by the indexing model from the issue text.

Description

          You can use the `--per-page` and `--page` flags of `clone student-repos` to pull more than 30 assignments per page and view other pages! Another user is also working on a `clone-all` option that should be coming soon!

Originally posted by @RyanHecht in https://github.com/github/gh-classroom/issues/12#issuecomment-1719538429

Sadly trying to get all pages for something over about 100 students fails with:

gh classroom clone student-repos --per-page 199 --directory /tmp/grading

HTTP 500: Server Error (https://api.github.com/assignments/.../accepted_assignments?page=1&per_page=199)

Is there any progress on a clone and pull for all students?

Dominant language
Go
Stars
126
Forks
21
PR merge metrics
No merged PRs in 30d

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 github/gh-classroom

All issues in github/gh-classroom

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.