This is an automation tool designed to initialize a classroom environment on GitHub. It invites students to an organization and sets up individual student repositories from template repositories, including milestones, deadline reminders, and feedback/grading workflows.
These scripts leverage the GitHub CLI (gh). Make sure you have it installed and authenticated with your GitHub account. For installation details, see GitHub CLI Installation.
Before running any script, make sure that:
- GitHub CLI (
gh) is installed, authenticated, and has sufficient organization/repository scopes. - The target GitHub Organization exists and you have administrator/owner permissions.
- The specified GitHub usernames (students and reviewers) are valid.
- Template Repositories exist and are accessible.
All configurations are centralized in a single .env file at the root. You do not need to edit individual scripts.
-
Copy the example configuration file:
cp .env.example .env
-
Open
.envand fill in your values.
ORG: The target GitHub organization name (e.g."FTDS-Assignment-Bay-2").BATCH_NAME: The batch/class identifier used in repo names (e.g."FTDS-043-HCK").TEAM_NAME: The target GitHub Team name inside the organization to add students to.USERS: Array of student GitHub usernames.REVIEWERS: Array of reviewer/instructor GitHub usernames.TEMPLATES: Array of template repositories and optional deadlines formatted as"organization/repository|YYYY-MM-DD HH:MM"(e.g."org/P0-GitHub-Starter|2026-12-31 23:59").
Invites students to the organization and registers them under a specific team.
Note
Students must accept their organization invitations before they can be assigned repository permissions in the next step.
ORGTEAM_NAMEUSERS
- Verifies if the specified GitHub Team exists within the Organization.
- Automatically creates the Team with
secretprivacy if it does not exist. - Resolves GitHub usernames to internal user IDs.
- Sends organization invitations to students with the
direct_memberrole and adds them directly to the specified team.
Run the script:
chmod +x scripts/invite.sh
./scripts/invite.shCreates private student repositories from templates and configures grading/deadline workflows.
USERSREVIEWERSBATCH_NAMETEMPLATES(uses both repository name and the deadline specified after the|)
-
Bulk Provisioning: Generates a private repository for each student from each specified template.
-
Milestone & Issue Creation: Converts local deadline inputs (Asia/Jakarta timezone) into ISO 8601 UTC and creates an "Assignment Deadline" milestone and reminder issue.
-
Collaborator Access:
- Assigns
writeaccess to the student. - Assigns
maintainaccess to any specifiedREVIEWERSso they can view and review student code.
- Assigns
-
Feedback Pull Request:
- Automatically initializes a
feedbackbranch. - Commits a
.github/FEEDBACK_HINT.mdfile. - Creates a "Feedback" pull request (comparing default branch to
feedback) and requests reviews from all specifiedREVIEWERS.
- Automatically initializes a
The generated repository name follows the pattern:
<REPO_NAME>-<BATCH_NAME>-<USERNAME>
Example: For template org/P0-GitHub-Starter, batch FTDS-043-HCK, and student userA, the repo name will be P0-GitHub-Starter-FTDS-043-HCK-userA.
Run the script:
chmod +x scripts/repo-create.sh
./scripts/repo-create.shChecks whether each expected repository for the batch and list of users has been created.
USERSBATCH_NAMETEMPLATES(ignores the deadline portion automatically)
Run the script:
chmod +x scripts/repo-check.sh
./scripts/repo-check.shClones the student repositories for the configured batch and user list into a local cloned/output/ directory.
USERSBATCH_NAMETEMPLATES(ignores the deadline portion automatically)
- Bulk Cloning: Clones all student repositories to
cloned/output/<repo-name>-<batch-name>-<user>. - Grading Templates Generation: Automatically creates:
cloned/output/todo.md: A checklist of all student usernames to track grading progress.cloned/output/review.md: A structured markdown file with review prompts (Review, Point Penting, and What can be Improved?) for each student username.
Run the script:
chmod +x scripts/repo-clone.sh
./scripts/repo-clone.shAll repositories will be cloned into ./cloned/output/<repo-name>-<batch-name>-<user>. Existing directories will be skipped.