This GitHub action was created for the course DD2482 Automated Software Testing and DevOps at Kungliga Tekniska Högskolan, Sweden. However, the action can be implemented into any course, and can be modified to be used for non-educational purposes too, since the action enables contributors of any repository to upvote other contributors' work, using a 👍 on an automatically generated issue that summarizes their work.
The aim of the action is to facilitate for students of DD2482 Automated Software Testing and DevOps to fulfill the grading criteria: "The task is praised by the other students of this course", which is currently one of the criteria for the "Course Automation" assignment.
- A student or teacher assistant includes the label
Upvote - Course Automation
in a PR to the course repository.- An issue
Upvote projects - Course Automation
is created, if no such issue already exists. The issue body includes a description of how to use the functionality, directed to the students. Furthermore, a “Top-list” that is going to show the most upvoted projects is incorporated to the issue, in the form of a comment. - Next, a comment is automatically added to the issue thread. The comment includes: the title of the student's PR, a link to the PR and a link to the repository. This information enables other students to read about the project.
- The student recieves a comment on their PR, stating that a comment has been added to the issue
Upvote projects - Course Automation
(including a link to the issue).
- An issue
- This enables other students to upvote their classmates projects, by inserting 👍 on the comments in the issue
Upvote projects - Course Automation
. - The upvotes are collected and visualized in the “Top-list”, which is sheduled to be automatically updated. As of now, the update is scheduled every 5 min, meaning that it takes place a few times every hour.
This section describes how the functionality is installed on a repository:
- Include a
.github/workflows
directory to the repository in the default branch. - In the
.github/workflows
directory, create a fileupvote.yml
and add the contents of this file to it. - Specify the path to the repository that you want the script to run from on
line 16
of theupvote.yml
file. - (Optional) Edit the label name on
line 46
andline 60
, if you want to adapt the label of the code for other tasks and courses. - Create a file
ISSUE_TEMPLATE.md
in the.github
directory. Use the following template. It's possible to adjust course name etc. in order to adapt the code for other courses. - Create a label
Upvote - Course Automation
(alternatively a label with the name you choose in step 4). - Now the functionality is installed and ready to use!
*Note: The following section is a reference to the grading criteria for the course DD2482 Automated Software Testing and DevOps course automation task. If you are not partaking in this course please feel free to ignore this section.
We believed that we have fulfilled the following 5 criteria:
- The automation task produces a PR status or issue / PR comment
- Yes, please see the section
Description of functionality
above. Furthermore, the PR comment and the "Top-list" comment generated for the issue includes links to the generated issue or a comment. Thus, we believe that the criteria for "Pass with distinction" is fulfilled.
- Yes, please see the section
- The automation task is reusable
- Yes, the task can be reused next year for the DevOps course. Moreover, the task can be used for other courses that use GitHub. Thus, we believe that the criteria for "Pass with distinction" is fulfilled. Please see the section
Installation
for more information.
- Yes, the task can be reused next year for the DevOps course. Moreover, the task can be used for other courses that use GitHub. Thus, we believe that the criteria for "Pass with distinction" is fulfilled. Please see the section
- The task runs on a standard platform (GitHub Action)
- Yes, the solution uses the GitHub Action platform.
- The code for the task is available
- Yes, please see repository here. Furthermore, we believe that the repository is properly documentated. Thus, we believe that the criteria for "Pass with distinction" is fulfilled.
- The task is praised by the other students of this course
- Yes, so far, we have recieved positive feedback when we've mentioned the idea to other students.
*Note: Since the forked repository has not yet been merged to the DD2482 Automated Software Testing and DevOps course repository, a simulation of the process has been performed, where a student-fork
branch (corresponding to a student's course-automation fork) makes a labeled PR to the 2021
branch of the forked repository.
The results can be seen here:
- Example PR: dmariel/devops-course#4
- Issue: dmariel/devops-course#5
The student creates a PR with the correct label (if the student is not able to add the label, this could be done by a teacher assistant):
This enables the checks of the action to start running:
An issue is created if none already exists:
A comment linking to the issue is added to student's PR:
Information about the student's course automation project is posted in the issue-thread:
Other students can upvote the project by inserting a 👍:
A "Top-list" is created and updated automatically (scheduled every 5 min):