github / gh-classroom

GitHub Classroom CLI Extension is a powerful and easy-to-use command line tool that enhances the functionality of the GitHub CLI, specifically tailored for educators using GitHub Classroom.
MIT License
82 stars 14 forks source link

commit_count giving values of 0 for some repos where there has been a student commit #53

Closed gihanmarasingha closed 11 months ago

gihanmarasingha commented 11 months ago

When running the accepted_assignments function, the returned commit_count is sometimes (though not usually) incorrect. For example, I have a student where git log shows a commit made by the student (and not by a bot!) before the deadline.

And yet the commit_count value returned for this student is 0. None the less, accepted_assignments also shows the student submitted and passed the assignment.

  'submitted': True,
  'passing': True,
  'commit_count': 0,
  'grade': '10/10',

Is this a bug or a feature? I was relying on changes to commit_count in my local autograding script to determine when to run the script. But now it seems unreliable.

I also wanted to look for commit_count == 0 to send reminder emails to students. Again, if I can't rely on commit_count for this purpose, I'm not sure what to do. I don't want to use submitted because that is False if a student commits after the deadline. I still want to know which students made a commit, whether its after or before the deadline.

zrdaley commented 11 months ago

hello @gihanmarasingha thank you for bringing this up!

we're looking into the problem on the backend and will report back here once there is a fix in place.

zrdaley commented 11 months ago

@gihanmarasingha we made a change in the backend that updates the commit count each time the accepted-assignments command is run. It should now return the most up to date commit_count - bot_commits.

If you are still having trouble please re-open the issue.

Have a great weekend!

gihanmarasingha commented 11 months ago

Awesome, thanks so much @zrdaley! I hope you have a great weekend too.