Skip to content

Commit 9a4b3b9

Browse files
authored
autograder: make sure mozilla-website- doesn't end up in student name
1 parent ce935e9 commit 9a4b3b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/classroom.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
REPO="${{ github.repository }}"
2727
REPO="${REPO##*/}"
2828
29-
# Strip trailing -<number> only
30-
STUDENT="$(echo "$REPO" | sed -E 's/-[0-9]+$//')"
29+
# 1. Strip assignment prefix
30+
STUDENT="${REPO#mozilla-website-}"
31+
32+
# 2. Strip trailing -<digits> if present
33+
STUDENT="$(echo "$STUDENT" | sed -E 's/-[0-9]+$//')"
3134
32-
COUNT=$(git log main --author="$STUDENT" --pretty=oneline | wc -l | tr -d ' ')
3335
echo "Student: $STUDENT"
34-
echo "Commit count on main: $COUNT"
35-
[ "$COUNT" -ge 5 ]
3636
timeout: 2
3737
max-score: 10
3838
- name: Autograding Reporter

0 commit comments

Comments
 (0)