The big goal of this project (for context): I am attempting to build a repository for my intro CS graders where they can create a Codespace and it basically clones only the students they have been assigned to grade, changes the name of the folders to be anon1 etc. They then grade the work in the Codespace and write the grade into a text file, that when they run a second program in the repo it converts into a PR comment (using the Github classroom feedback PR). We use Github classroom and I currently have this setup in a second organization/classroom to keep the graders separate from the students.
I am fairly unfamiliar with Github and have been learning on the job. I have built a script previously that goes through the entire organization and reads all the Feedback PR’s for a specific assignment and converts username and grade to a csv so I don’t have to open 150 student submissions to get their grades. I did this in Python, and I have a Github token saved to the script so I know that token has the right permissions.
I want to have them all in one codespace to save the graders time opening a codespace for each assignment. Right now, I am getting a 403 permission error.
Cloning into 'Testing-Permissions'...
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/ORG/Testing-Permissions/': The requested URL returned error: 403
I was originally trying the student org but I even made another repository inside the grader org to see if that would help and I get the above error. So I think the issue is with the codespace settings and not with the token permissions. This is the current dev container file I have that I got from another stack post (that I have since lost) but it isn’t doing the trick.
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
}
},
"customizations": {
"codespaces": {
"repositories": {
"org/repo":{
"permissions": "write-all"
}
}
}
}
Thanks in advance for any help! If any other CS Ed people want this code after I finish it please let me know I would be willing to share!
Lucas Draper is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.