Skip to content

GitHub action created for the course DD2482 Automated Software Testing and DevOps at Kungliga Tekniska Högskolan

License

Notifications You must be signed in to change notification settings

dmariel/upvote-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Course Automation: Upvote other students’ work

Members

Introduction

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.

Description of functionality

  • A student or teacher assistant includes the label Upvote - Course Automation in a PR to the course repository.
    1. 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.
    2. 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.
    3. 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).
  • 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.

Installation

This section describes how the functionality is installed on a repository:

  1. Include a .github/workflows directory to the repository in the default branch.
  2. In the .github/workflows directory, create a file upvote.yml and add the contents of this file to it.
  3. Specify the path to the repository that you want the script to run from on line 16 of the upvote.yml file.
  4. (Optional) Edit the label name on line 46 and line 60, if you want to adapt the label of the code for other tasks and courses.
  5. 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.
  6. Create a label Upvote - Course Automation (alternatively a label with the name you choose in step 4).
  7. Now the functionality is installed and ready to use!

Criteria fulfilled

*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.
  • 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.
  • 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.

Using the functionality

*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:

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):

About

GitHub action created for the course DD2482 Automated Software Testing and DevOps at Kungliga Tekniska Högskolan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages