Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates project submission to accept code links from any Git provider by removing GitHub-specific fields and validation.
Changes:
- Removes
githubUsernamecollection/storage across the submission, API, and reviewer dashboard flows. - Relaxes
codeUrlvalidation from “GitHub-only” to any validhttp(s)URL. - Updates validation tests to reflect the removed
githubUsernamefield.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| resolution-frontend/src/routes/app/reviewer/+page.svelte | Removes githubUsername from the reviewer-facing submission type. |
| resolution-frontend/src/routes/app/pathway/[pathway]/week/[week]/ship/+page.svelte | Removes GitHub username input and GitHub-only codeUrl input restrictions. |
| resolution-frontend/src/routes/api/ships/submit-project/+server.ts | Stops writing the “GitHub Username” field into Airtable on submission. |
| resolution-frontend/src/routes/api/review/submissions/+server.ts | Stops fetching/mapping the “GitHub Username” field for reviewers. |
| resolution-frontend/src/lib/server/validation/schemas.ts | Changes codeUrl to accept any safe URL and removes required githubUsername. |
| resolution-frontend/src/lib/server/validation/schemas.test.ts | Updates tests/fixtures to match schema changes (removes githubUsername). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
44
to
46
| export const projectSubmissionSchema = z.object({ | ||
| codeUrl: safeUrl.refine( | ||
| (val) => /^https:\/\/github\.com\/.+\/.+/.test(val), | ||
| { message: 'Must be a GitHub link (https://github.com/username/repo)' } | ||
| ), | ||
| codeUrl: safeUrl, | ||
| playableUrl: safeUrl, |
There was a problem hiding this comment.
The schema change now permits non-GitHub codeUrl values, but the tests still only exercise a GitHub URL in the “valid” fixture. Add a test case that uses a non-GitHub provider URL (e.g., GitLab/Bitbucket or a self-hosted Git service) to prevent regressions back to GitHub-only validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.