Action/Workflow/API to change repo visibility

OK, my second question here :slight_smile:

Is there some sort of mechanism I can incorporate into my assignment repo that will automatically change their visibility to “private” once the student’s code passes all my pytests? Those tests are already triggered by the student’s commit/push…

I ask because… maybe this is a workaround to being forced into making assignment repo’s public so they are accesible by students in repl.it. Which makes cheating almost certain.

Or, maybe I should just not use repl.it, just a stand-alone IDE and students upload their files to the assignment repo?

You could use the GitHub REST API to interact with GitHub and change the visibility of the repository through the set_private service. The latter belongs to the Ruby octokit package but there exist analogous interfaces for Python, Javascript and the like.

Well, to fiddle with the REST API you’d need to be familiar with such a workflow and this doesn’t come for free, of course. However, if you’d like to have a brief taste of what this means, look at these example scripts.

That said, I’m not into the repl.it things but it sounds to me a bit weird that repos need to be public, to say the least. Anyway, I’m on the side of those who think that counteracting cheating won’t simply work. Better off proposing students to solve real problems while using real-life tools like GitHub in a setting where they are engaged as it would be for real. They’ll feel the thrill and will be less prone to cheating as a natural consequence.

1 Like

Thanks!! Appreciate the direction :slight_smile: :+1:

1 Like
© 2017 GitHub, Inc.
with by
GitHub Education