英文:
How can students update their GitHub Classroom assignment repository?
问题
我有一个任务已经被一些学生接受了,我需要更新它。
我已经更新了任务模板。
学生如何将更新合并到他们的存储库中?(我需要学生自己合并更改到他们的存储库中)。
我找不到关于如何做这个的说明。有关如何更新任务配置的说明,但这不会更新学生的存储库。
我有一个学生测试帐户,我尝试将模板任务存储库设置为远程,但它找不到它(也许因为它是私有的,但我不能将它公开)。
英文:
I have an assignment that was already accepted by some of the students and I need to update it.
I updated the assignment template.
How can students now merge the updates into their repositories? (I need to have the students merge the changes to their repositories themselves).
I can't find instructions on how to do this anywhere. There are instructions on how to update the assignment configuration but that doesn't update the student repositories.
I have a student test account with which I tried to set the template assignment repository as a remote but it can't find it (maybe because it's private, but I can't make it public).
答案1
得分: 1
- 从 Github Classroom 下载课堂名单。名单中包括标识符和相应的 Github 用户名。
- 找到 Github 组织中与作业相关的所有存储库。您可以使用 Github API
api.github.com/orgs/ORG/repos
获取组织中的所有存储库,并通过assignment_name-github_username
以及如果之前存在具有相同名称的作业,还可以通过created_at
属性来过滤它们。 - 分别将您的更新合并/PR到步骤 2 中找到的所有存储库。您可以在本地运行一个简单的脚本来完成此步骤,因为您对所有存储库都具有完全权限。
英文:
I got the same problem recently. It seems that there's no offical method provided, and here's what I think could be a solution:
- Download classroom roster from Github Classroom. Identifier and corresponding Github username are included in the roster.
- Find all assignment-relevant repositories in the Github organization. You can use Github API
api.github.com/orgs/ORG/repos
to get all repositories in the organization and filter them byassignment_name-github_username
and maybecreated_at
attribute if previous assignments with the same name exist. - Merge/PR your update to all repos found in step 2 respectively. You can run a simple script locally to finish the step, since you have full permission for all the repos.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论