Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission of Course Automation: Upvote other students' work (#991) #1157

Merged
merged 39 commits into from
Apr 27, 2021

Conversation

dmariel
Copy link

@dmariel dmariel commented Apr 7, 2021

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

@khesoem khesoem self-assigned this Apr 14, 2021
@khesoem khesoem added course_automation final_submission The final submission of a task labels Apr 15, 2021
@khesoem
Copy link

khesoem commented Apr 15, 2021

Hi @dmariel ,

Seems to be a good implementation. We are adding new clarifications to our grading criteria for course-automation tasks here. Can you please follow this rules?

  1. The automation task (ex., Github Action) should be implemented in a stand-alone repository, not as a part of the Deveops-Course repository. The final submission must include a link to the repository that implements the task.
  2. You should demonstrate that your automation technique actually works and automatically produces some results. For example, you can fork the Devops-Course repo and activate the implemented Github Action on it and show how it works by making changes in your forked repo. In case of this example, a link to your forked repository should be included in the final submission.

@dmariel
Copy link
Author

dmariel commented Apr 27, 2021

Hi!

  1. We have now published the code in a separate repository, available here
  2. We have included a demonstration in a fork that shows that the automation technique works. Please see attached images in the repository README. The results can be seen here:

We believe that we have now followed the updated rules for submission, please correct us if we're wrong @khaes-kth

@khesoem
Copy link

khesoem commented Apr 27, 2021

Thanks @dmariel

Please add the information regarding the example PR, that you said in your comment, in the readme file as well.

Note that you should not change the contents of the .github folder of this project. Please remove those changes. We will use your tool later if necessary.

@dmariel
Copy link
Author

dmariel commented Apr 27, 2021

Thanks for the quick response! The information regarding the example PR can be found in the README-file and we have now deleted the .github folder @khaes-kth

@khesoem khesoem merged commit 34079c6 into KTH:2021 Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
course_automation final_submission The final submission of a task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants