chadfawcett / classroom-bot-issues

Copies open issues from starter repository to student assignment repositories
https://github.com/apps/classroom-bot-issues
MIT License
2 stars 1 forks source link

Issues list not imported in student repos #2

Open ghost opened 5 years ago

ghost commented 5 years ago

I added the app to both my personal account and to the organization, and then created a new assignment. I logged in to a different account and succefully accepted the assignment, however the issues were not brought across to the student repo. I installed the app using Marketplace rather than from the github repo.

chadfawcett commented 5 years ago

Hmm, it looks like the app is trying to copy issues from the student account back to the student account. I had made the assumption that GitHub Classroom would be importing the student repos as the students, so I would have their username. Turns out this isn't the case and your username is the one making the requests from Classroom.

I can work on fixing this, but in the meantime you can fix this with some manual configuration. Note, I looked at the CISatUH organization and didn't see any "starter" repos so you might have to do this anyways. The instructions for the configuration are in the README but I will go into a bit more details below.

Currently the app will get a notification from GitHub saying that your organization created a student repo (ex CISatUH/debugging-redo-chadfawcett). It then needs to determine the name of the starter repo (the one that has the issues you want copied). It does this by replacing the student name chadfawcett with starter, this results in it thinking the starter repo is named CISatUH/debugging-redo-starter. Note: this last step is where the bug is, as it's trying to replace klancasterprof with starter for all the students repos which obviously doesn't work.

Fortunately since not everyone is going to name their starter repos like <assignment-prefix>-starter I added the ability to manually configure the name of the starter repo. As described in the link above, you can add the following file (.github/config.yml) to your starter repo which should make things work.

issues:
  # this doesn't have to follow any particular pattern
  # it could even be something like assignment1-master-repo
  starterName: debugging-redo-master

Let me know if that works or not.

dowobeha commented 2 years ago

This is not working for me, even when providing the starterName in .github/config.yml