Skip to content

refactor(registration): remove Classroom org-invite API automation#203

Merged
accesswatch merged 1 commit into
mainfrom
refactor/registration-without-org-api
May 12, 2026
Merged

refactor(registration): remove Classroom org-invite API automation#203
accesswatch merged 1 commit into
mainfrom
refactor/registration-without-org-api

Conversation

@accesswatch
Copy link
Copy Markdown
Collaborator

Summary

Removes the CLASSROOM_ORG_ADMIN_TOKEN + Classroom org-invite API automation from the registration pipeline. Replaces it with the simpler 'post the Day 1 and Day 2 assignment URLs in the welcome comment' flow.

The registration workflow keeps everything else: capacity checks, duplicate detection, waitlist handling, label management, CSV export, and the welcome comment itself. Day 2 release gate and instructor dashboard sync drop their org-API dependencies for the same reason.

Why

Maintaining a fine-grained admin token with org invitation scope added:

  • A fragile setup step every facilitator had to follow exactly
  • An extra secret to rotate on a schedule
  • A class of failures (token expiry, scope drift, org rename) that broke registration silently for every cohort

Posting two assignment URLs in a welcome comment is equivalent for the student, requires zero secrets, and cannot break in production.

What changes

  • .github/workflows/registration.yml -- drop the org-invite job, keep welcome comment with Day 1/Day 2 URLs
  • .github/workflows/day2-release.yml -- drop org-API dependency
  • .github/workflows/instructor-dashboard-sync.yml -- drop org-API dependency, simplify dashboard build
  • .github/scripts/__tests__/registration-workflow-readiness.test.js -- update assertion to match new flow
  • scripts/classroom/Initialize-WorkshopSetup.ps1 -- remove the CLASSROOM_ORG_ADMIN_TOKEN bootstrap step
  • Admin docs (REGISTRATION-QUICKSTART, QUICK_START_SETUP, FINE_GRAINED_TOKEN_SETUP, CLASSROOM_INTEGRATION_GUIDE, ENROLLMENT_SETUP_CHECKLIST, GITHUB_CLASSROOM_ARCHITECTURE, IMPLEMENTATION_SUMMARY) -- drop org-admin token sections, document the URL-only flow, remove now-irrelevant architecture diagrams
  • admin/qa-bundle/.github/workflows/registration.yml -- sync qa-bundle copy

Rollback

Clear repository variables CLASSROOM_DAY1_ASSIGNMENT_URL and CLASSROOM_DAY2_ASSIGNMENT_URL. The rest of the registration workflow (capacity, duplicates, waitlist, CSV) keeps running unchanged.

Test plan

  • npm run test:automation (the updated readiness test now asserts the new welcome-comment shape)
  • One smoke-test registration issue from a non-member account verifies the welcome comment contains both assignment links and the registration label is applied
  • Confirm the duplicate detection branch still closes a second submission from the same user with the duplicate message
  • Confirm waitlist behavior triggers when capacity is full

Relationship to other PRs

Independent of #202 (autograding workflows migration). Either can land first; rebasing the other on top of main afterward is a clean git rebase.

Replaces the CLASSROOM_ORG_ADMIN_TOKEN + Classroom org-invite API path
with a simpler 'post the assignment URLs only' flow. The registration
workflow remains responsible for capacity checks, duplicate detection,
waitlist handling, label management, and CSV export -- it just stops
trying to drive the GitHub org membership API.

What changes

- .github/workflows/registration.yml: drop the org-invite job, keep
  the welcome comment with Day 1 and Day 2 assignment URLs
- .github/workflows/day2-release.yml: drop org-API dependency
- .github/workflows/instructor-dashboard-sync.yml: drop org-API
  dependency and simplify the dashboard build
- .github/scripts/__tests__/registration-workflow-readiness.test.js:
  update the assertion to match the new flow
- scripts/classroom/Initialize-WorkshopSetup.ps1: remove the
  CLASSROOM_ORG_ADMIN_TOKEN bootstrap
- admin/REGISTRATION-QUICKSTART.md, QUICK_START_SETUP.md,
  FINE_GRAINED_TOKEN_SETUP.md, CLASSROOM_INTEGRATION_GUIDE.md,
  ENROLLMENT_SETUP_CHECKLIST.md, GITHUB_CLASSROOM_ARCHITECTURE.md,
  IMPLEMENTATION_SUMMARY.md: drop org-admin token setup sections,
  document the new URL-only flow, and remove now-irrelevant
  architecture diagrams
- admin/qa-bundle/.github/workflows/registration.yml: sync the
  qa-bundle copy of the new registration workflow

Why

Maintaining a fine-grained admin token with org invitation scope
added a fragile setup step, an extra secret to rotate, and a class of
failures (token expiry, scope drift, org rename) that broke
registration for every cohort. Posting two assignment URLs in a
welcome comment is equivalent for the student, requires zero secrets,
and cannot break in production.

Rollback

If the new flow needs to be disabled, clear repository variables
CLASSROOM_DAY1_ASSIGNMENT_URL and CLASSROOM_DAY2_ASSIGNMENT_URL.
The rest of the registration workflow (capacity, duplicates,
waitlist, CSV) continues running unchanged.
Copilot AI review requested due to automatic review settings May 12, 2026 19:36
@accesswatch accesswatch requested a review from taylorarndt as a code owner May 12, 2026 19:36
@github-actions
Copy link
Copy Markdown
Contributor

Peer Review Assigned

Hi @accesswatch! Your PR has been automatically paired with @taylorarndt for peer review.

For @taylorarndt:

This is a great opportunity to practice code review skills! Here's what to look for:

Content Quality:

  • Does the change accomplish what the issue describes?
  • Is the writing clear and helpful?
  • Are there any typos or grammar issues?

Accessibility:

  • Proper heading hierarchy (H1 → H2 → H3, no skips)?
  • Descriptive link text (not "click here")?
  • Alt text on images?
  • [TODO] markers removed?

Documentation:

  • Code blocks are properly formatted?
  • Tables have headers?
  • References/links work correctly?

Review Guidelines:

  • Be kind and constructive
  • Suggest improvements, don't just point out problems
  • Ask questions if something is unclear
  • Approve when ready or request changes with explanation

Resources:


Pairing by Learning Room Grouping Engine

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the registration/enrollment automation to remove GitHub Classroom organization-invite API usage (and the associated admin token), replacing it with a simpler flow that delivers Day 1/Day 2 assignment invite URLs via issue comments and uses issue signals for Day 2 release and dashboard status.

Changes:

  • Removes org-invite automation from registration.yml, day2-release.yml, and instructor-dashboard-sync.yml, relying on assignment URLs + issue labels/comments instead.
  • Updates facilitator/admin documentation and setup scripts to drop CLASSROOM_ORG_ADMIN_TOKEN and org-related variables.
  • Updates the automation readiness test to assert the new welcome/onboarding comment shape.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/classroom/Initialize-WorkshopSetup.ps1 Removes org-admin token setup; keeps variable + label setup and template prep/validation.
admin/REGISTRATION-QUICKSTART.md Updates quickstart to variable-only setup and new rollback guidance.
admin/QUICK_START_SETUP.md Rewrites quick start for assignment-link-based registration/enrollment flow.
admin/qa-bundle/.github/workflows/registration.yml Syncs QA bundle registration workflow to remove org-invite step.
admin/IMPLEMENTATION_SUMMARY.md Replaces prior org-invite-focused summary with the new interaction/credential model.
admin/GITHUB_CLASSROOM_ARCHITECTURE.md Updates architecture doc to describe the new issue-signal + link-posting model.
admin/FINE_GRAINED_TOKEN_SETUP.md Replaces token guide with current secrets/variables and verification/rotation guidance.
admin/ENROLLMENT_SETUP_CHECKLIST.md Removes org/token steps; documents the Day 2 release signal approach.
admin/CLASSROOM_INTEGRATION_GUIDE.md Updates guide to focus on assignment links + dashboard triage, not org invites.
.github/workflows/registration.yml Removes org-invite and classroom join link; keeps welcome comments and labeling.
.github/workflows/instructor-dashboard-sync.yml Removes classroom org scanning; computes status from enrollment issues/comments/labels.
.github/workflows/day2-release.yml Removes classroom repo inspection; releases Day 2 based on labels/comments.
.github/scripts/tests/registration-workflow-readiness.test.js Updates assertions to match the new onboarding messaging.
Comments suppressed due to low confidence (1)

admin/REGISTRATION-QUICKSTART.md:52

  • Rollback instructions say clearing either CLASSROOM_DAY1_ASSIGNMENT_URL or CLASSROOM_DAY2_ASSIGNMENT_URL will “disable assignment-link posting,” but the workflow will still post whichever link remains set. If the intent is to disable link posting entirely, the rollback should instruct clearing both variables (or update the wording to match the actual behavior).
If anything behaves unexpectedly, disable assignment-link posting without stopping registration:

1. Clear `CLASSROOM_DAY1_ASSIGNMENT_URL`, or
2. Clear `CLASSROOM_DAY2_ASSIGNMENT_URL`

Comment on lines 366 to +371
'- GitHub notification bell',
'- Email notifications for this issue thread',
'',
'Please reply `ack` on this issue after you confirm your Day 1 link works.',
'',
`${orgStatusSection}If you get stuck at any step, open support:`,
'If you get stuck at any step, open support:',
Comment on lines 198 to 203
# ---------------------------------------------------------------------------
# Step 2: Set repository variables
# ---------------------------------------------------------------------------
Write-Step "Setting repository variables on $Repo"

$variablesToSet = @(
Comment on lines +13 to +17
1. Student opens enrollment or registration issue.
2. `registration.yml` validates submission and posts assignment links.
3. Student replies `ack` after Day 1 link verification.
4. Student replies `day1-complete` after Day 1 milestone.
5. `day2-release.yml` posts Day 2 assignment link when completion signal is present.
Comment on lines 39 to 45
## Fast Verification Checklist

- [ ] Test user received or already had organization invite
- [ ] Confirmation comment includes assignment links
- [ ] Duplicate submission closes automatically with duplicate message
- [ ] Waitlist behavior still works when capacity is full
- [ ] Student can reply `ack`, then `day1-complete`, and receive Day 2 release comment

@accesswatch accesswatch merged commit a990394 into main May 12, 2026
7 checks passed
@accesswatch accesswatch deleted the refactor/registration-without-org-api branch May 12, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants