学生如何更新他们的GitHub Classroom作业存储库?

huangapple go评论68阅读模式
英文:

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

  1. 从 Github Classroom 下载课堂名单。名单中包括标识符和相应的 Github 用户名。
  2. 找到 Github 组织中与作业相关的所有存储库。您可以使用 Github API api.github.com/orgs/ORG/repos 获取组织中的所有存储库,并通过 assignment_name-github_username 以及如果之前存在具有相同名称的作业,还可以通过 created_at 属性来过滤它们。
  3. 分别将您的更新合并/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:

  1. Download classroom roster from Github Classroom. Identifier and corresponding Github username are included in the roster.
  2. 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 by assignment_name-github_username and maybe created_at attribute if previous assignments with the same name exist.
  3. 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.

huangapple
  • 本文由 发表于 2023年3月7日 23:21:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/75663866.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定