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

Add 'create feedback issues' option to teach-class #391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions practice-repos/caption-this/participant_baseline.md
Original file line number Diff line number Diff line change
@@ -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?
4 changes: 4 additions & 0 deletions practice-repos/caption-this/retro_day1.md
Original file line number Diff line number Diff line change
@@ -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 👇
4 changes: 4 additions & 0 deletions practice-repos/caption-this/retro_day2.md
Original file line number Diff line number Diff line change
@@ -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 👇
41 changes: 41 additions & 0 deletions script/create-feedback-issues
Original file line number Diff line number Diff line change
@@ -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!"
7 changes: 7 additions & 0 deletions script/teach-class
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down