{"id":23819841,"url":"https://github.com/kth/github-canvas-integration-devops","last_synced_at":"2026-05-08T13:30:18.253Z","repository":{"id":42982148,"uuid":"460461082","full_name":"KTH/github-canvas-integration-devops","owner":"KTH","description":"Integration code written for the KTH DevOps course","archived":false,"fork":false,"pushed_at":"2024-08-22T12:58:27.000Z","size":77,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-02T07:15:54.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KTH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-17T14:05:34.000Z","updated_at":"2024-08-22T12:58:31.000Z","dependencies_parsed_at":"2024-05-01T14:49:56.630Z","dependency_job_id":"3cca0335-6d8d-440a-8d19-a68063e2176e","html_url":"https://github.com/KTH/github-canvas-integration-devops","commit_stats":null,"previous_names":["kth/github-canvas-integration-devops"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fgithub-canvas-integration-devops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fgithub-canvas-integration-devops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fgithub-canvas-integration-devops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fgithub-canvas-integration-devops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KTH","download_url":"https://codeload.github.com/KTH/github-canvas-integration-devops/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100517,"owners_count":19747683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T07:16:03.825Z","updated_at":"2026-05-08T13:30:18.184Z","avatar_url":"https://github.com/KTH.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Canvas Integration\n\n## About it\n\nThis tools was created for the course [DD2482 Automated Software Testing and DevOps](https://www.kth.se/student/kurser/kurs/DD2482?l=en) at KTH and is meant to create an interface between the course [GitHub repository](https://github.com/KTH/devops-course) and the Canvas.\n\nFor educational purpose, all the assignments registration are done on GitHub. And the goal of this tool is to replicate and keep up to date all the assignment and groups with Canvas.\n\n## Requirements\n\nIn the GitHub secrets, you need to add the following :\n\n| key | Details  | \n|---|---|\n| CANVAS_TOKEN |  Canvas access token generated [on your profile](https://canvas.kth.se/profile/settings) |\n| CANVAS_COURSE_ID | Course ID of the Canvas course  | \n| GH_REPO_FULLNAME  | Full name of the repo using running the code (e.g. KTH/devops-course)  | \n| GH_TOKEN  |  GitHub access token generated [on your profile](https://github.com/settings/tokens) | \n\n- The *CANVAS_* secrets are used to interact with the canvas server (e.g. manage assignments, groups, ...)\n- The *GH_* secrets are used to interact with h the GitHub repo (e.g. open issue, comment PR, ..)\n\n## How it works\n\n- **Update grading**\n    \nThe GitHub action `update_criteria.yml` is triggered each time the `grading-criteria.md` is changed. We are first parsing the file to extract the assignments, then we validate the structure, and finally we use the Canvas API to create/update the following :\n\n    - Group categories sets\n    - Assignements\n    - Rubrics\n    \n \n - **Update task**\n    \nThe GitHub action `update_task.yml` is triggered each time a change is made in the contributions folder. We are first getting the task present in the contributions folder and then using the Canvas API to manage the group category by adding/removing the following :\n\n    - Group\n    - Members \n    \n While validating the group, we check the following:\n \n - Members can't be registered more than one time for a task\n - Members must be registered to the canvas course\n - README.md must have the correct sections\n\n## How to run\n\n`python3 ./update_task.py`\n\n`python3 ./update_grading.py`\n\n## Options\n\nAll options have a default value and can be adapted using the following:\n\n| Option | Usage | Example | update_grading.py | update_task.py |\n|---|---|---|---|---|\n|--mode| If you only want to check the requirements  | `./update_task.py --mode check` |:heavy_check_mark:|:heavy_check_mark:|\n|--pr| Pull request id | `./update_task.py -pr ${{github.event.number}}` |:x:|:heavy_check_mark:|\n|--sections| Sections required in the proposal | `./update_task.py --sections \"Assignment Proposal\" Deadline` |:x: |:heavy_check_mark:|\n|--grading| Path to grading criterias | `./update_grading.py --grading ./grading-criteria-md` |:heavy_check_mark:|:x:|\n|--issue| List of issue assignees | `./update_grading.py --issue githubuser1 ${{github.actor}}` |:heavy_check_mark:|:x:|\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth%2Fgithub-canvas-integration-devops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkth%2Fgithub-canvas-integration-devops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth%2Fgithub-canvas-integration-devops/lists"}