From 51dff35e0740b364513607b91e8ce595003fab67 Mon Sep 17 00:00:00 2001 From: Jesse Swart Date: Wed, 15 Feb 2023 12:43:23 +0100 Subject: [PATCH] Add 'create feedback issues' option to teach-class --- .../caption-this/participant_baseline.md | 4 ++ practice-repos/caption-this/retro_day1.md | 4 ++ practice-repos/caption-this/retro_day2.md | 4 ++ script/create-feedback-issues | 41 +++++++++++++++++++ script/teach-class | 7 ++++ 5 files changed, 60 insertions(+) create mode 100644 practice-repos/caption-this/participant_baseline.md create mode 100644 practice-repos/caption-this/retro_day1.md create mode 100644 practice-repos/caption-this/retro_day2.md create mode 100755 script/create-feedback-issues diff --git a/practice-repos/caption-this/participant_baseline.md b/practice-repos/caption-this/participant_baseline.md new file mode 100644 index 00000000..a00c138a --- /dev/null +++ b/practice-repos/caption-this/participant_baseline.md @@ -0,0 +1,4 @@ +## What is your experience with git and GitHub? + +Please leave a comment below with your experience with git and GitHub so far. +Have you used either in the past? What do you expect to learn in this training? \ No newline at end of file diff --git a/practice-repos/caption-this/retro_day1.md b/practice-repos/caption-this/retro_day1.md new file mode 100644 index 00000000..7b494396 --- /dev/null +++ b/practice-repos/caption-this/retro_day1.md @@ -0,0 +1,4 @@ +## Time for a small retro! + +Now that you have completed the first day of training, I would like to hear your feedback. +What was good? What can be improved? What was missing? Any additional comments? Please leave a comment below πŸ‘‡ \ No newline at end of file diff --git a/practice-repos/caption-this/retro_day2.md b/practice-repos/caption-this/retro_day2.md new file mode 100644 index 00000000..41864cd0 --- /dev/null +++ b/practice-repos/caption-this/retro_day2.md @@ -0,0 +1,4 @@ +## Time for a small retro! + +Now that you have completed the training, I would like to hear your feedback. +What was good? What can be improved? What was missing? Any additional comments? Please leave a comment below πŸ‘‡ \ No newline at end of file diff --git a/script/create-feedback-issues b/script/create-feedback-issues new file mode 100755 index 00000000..49fff3d1 --- /dev/null +++ b/script/create-feedback-issues @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Create feedback issues + +# shellcheck disable=SC1091 +source "$HOME/.trainingmanualrc" + +# shellcheck source=script/shared_functions +source ./shared_functions + +# Shell variables +collab_repo=$1 +repo_endpoint="https://$INSTANCE_URL/repos/$CLASS_ORG/$collab_repo" +repo_url="https://$ROOT_URL/$CLASS_ORG/$collab_repo" + +create_feedback_issues() { + # Navigate to the practice-repos directory + cd "$(dirname "$0")/../practice-repos" || exit + + # Set $practice_repos_dir to the "physical" path of the working directory + practice_repos_dir=$(pwd -P) + + # Switch back to the previous directory + cd - >/dev/null || exit + + # Create the participant baseline issue + create_issue --repo "$collab_repo" --title "❓What is your experience with git and GitHub?" \ + --body "$(<"$practice_repos_dir/caption-this/participant_baseline.md")" + + # Create the day 1 retro issue + create_issue --repo "$collab_repo" --title "πŸ” Retro day 1" \ + --body "$(<"$practice_repos_dir/caption-this/retro_day1.md")" + + # Create the day 2 retro issue + create_issue --repo "$collab_repo" --title "πŸ” Retro day 2" \ + --body "$(<"$practice_repos_dir/caption-this/retro_day2.md")" +} + +create_feedback_issues + +print_done "Created 3 feedback issues!" \ No newline at end of file diff --git a/script/teach-class b/script/teach-class index b7728624..786689fe 100755 --- a/script/teach-class +++ b/script/teach-class @@ -27,6 +27,7 @@ get_task() { echo " 6: Create the github-games repos for each student" echo " 7: Delete student repos for a specific class" echo " 8: Grade client" + echo " 9: Create feedback issues" # Read the task that was input read -r TASK @@ -131,6 +132,12 @@ do_task() { # echo "8: Grade client" echo "Running script/grade-client" ./grade-client + + # TASK 9 + elif [ "$TASK" -eq 9 ]; then + # echo "9: Create feedback issues" + echo "Running script/create-feedback-issues" + ./create-feedback-issues "$COLLAB_REPO" fi }