Delaying release of feedback

When I add feedback to a student repo by commenting on the automatically opened PR, is there a way to delay releasing the feedback so that students get it all at once? As far as I know you can’t comment on a PR offline and then push changes.

In case others are interested, here’s a potential solution that’s not super clean, but could work:

  • Install the GitHub CLI tool
  • Download all assignments with the Classroom Assistant
  • Create a text file in each repo containing the comments, e.g. through the command line as echo "Variable name `foo` is ambiguous" > feedback
  • After commenting on all the student repos, loop through each directory and run gh pr 1 comment -F feedback to post all the comments at once

I’ll probably wrap this up in a script that also:

  • reopens PR #1 in case the student closed it
  • either runs gh pr 1 diff or gh pr view 1 --web to show me the code (web view might be easier for more complex assignments)
  • prompts me for the comment to be stored in a file with the name feedback or some such to avoid typos

I created a tool which automates creating marking repository with one PR per student. I think you could, without too much work, extend the tool to provide a copy-back functionality to push all the comments back into the students’ feedback PRs in one hit. The tool is here: GitHub - dham/classroom-tool: A tool to help instructors work with GitHub Classroom.

In fact, that would be good for providing feedback from my exams. I might try to find time to code it up - though probably not for a couple of months. PRs welcome in the meantime :wink:

Hello Dham,
Can your tool add a function to delete all students’ work in a classroom/assignment? Since I want to clean the classroom every semester and reuse the classroom link for next semester.


Hi Prof. Zhang,

That’s not really how GitHub classroom is intended to work. The usual pattern is that you have a GitHub organization for your course and that can persist for ever. A classroom is really targeted at running the course once. So the idea is that you make a new classroom in the same organization each semester. Notice that the class roster is at classroom level for this reason. It then doesn’t matter that you have a whole load of old repositories lying around in your organization - and going around deleting students’ code is likely to cause them to be pretty unhappy!



Hi David,

Sorry for my delayed reply! I took a look at your tool and ultimately it is a bit more involved than my needs for now, so I ended up writing my own at GitHub - cfcurtis/gh-marking-scripts: Helper scripts to make marking and adding feedback a little easier. As the semester progresses I may well find myself needing more advanced functionality, so I will keep an eye on your repo.

Thanks for sharing,

@canhelp2001 - I agree it would be nice to keep the org clean! I’d be happy with folders to organize the repo browser though.