feat(web): add assignmentUrls query for per-student/group repo URLs#101
Merged
Conversation
First read-only GitLab-adjacent operation for glabs-web (Milestone B). It is derived purely from the resolved course config — no GitLab token or API call — so it is fully testable and safe to expose before the token-backed operations. - config: extract RepoURLs() (For + URL per student/group) from the printing Urls method, so the CLI and the web share one implementation; add studentLabel (email, else username/raw/id). - web/app: AssignmentURLs resolves the assignment from the stored bytes (exactly like Assignment) and returns the group URL plus one entry per student/group; returns nil for a missing or unresolvable (e.g. abstract) assignment. - graph: AssignmentUrls/RepoUrl types + assignmentUrls query, resolver, mapping. - tests for RepoURLs (config) and AssignmentURLs (app, incl. abstract/missing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Erste read-only GitLab-nahe Operation für glabs-web (Milestone B). Sie ist rein aus der aufgelösten Kurs-Config abgeleitet — kein GitLab-Token, kein API-Call — daher voll testbar und gefahrlos vor den token-gestützten Operationen exponierbar.
Was drin ist
RepoURLs()(je Studierende/GruppeFor+URL) aus der druckendenUrls-Methode herausgezogen, sodass CLI und Web eine Implementierung teilen.Urlsdruckt jetzt darüber (identische Ausgabe). Neuer HelferstudentLabel(E-Mail, sonst Username/Raw/Id).AssignmentURLslöst das Assignment aus den gespeicherten Bytes auf (genau wieAssignment) und liefert die Gruppen-URL plus je einen Eintrag pro Studierende/Gruppe. Gibtnil(kein Fehler) zurück, wenn es das Assignment nicht gibt oder es nicht auflösbar ist (z. B. abstrakte Basis).AssignmentUrls/RepoUrl, QueryassignmentUrls(course, name), Resolver + Mapping (gqlgen regeneriert).RepoURLs(config, Student-Label-Fallback + per-group) undAssignmentURLs(app: per-student, fehlendes Assignment, abstrakte Basis).GraphQL
Verifikation (lokal grün)
go build ./...,go vet ./...,go vet -tags=integration ./...,go test ./...,golangci-lint run— alle sauber;gofmtclean.Nächster Schritt: das GUI konsumiert
assignmentUrlsund zeigt die Repo-Links auf der Assignment-Seite (separater glabs.gui-PR).🤖 Generated with Claude Code