Registrera dig för 2026 års antagningsprov. Öppna en issue per prov du vill ta.
Find a file
Giacomo Turatto cf855398e9 register: reuse existing repo on HTTP 409 instead of dead-ending
When an applicant's <ansok>-<exam> repo already exists (duplicate
registration, or an `edited`/`reopened` event re-triggering the
workflow), the template-generate call returns 409 and the applicant
previously got " Kunde inte skapa repo: HTTP 409. Kontakta personal."
with the issue left open — a dead-end that generated support requests.

Now 409 is treated as success: GET the existing repo's html_url and
continue through the collaborator, applicants.csv, and success-comment
+close steps, so the applicant gets their repo link back. Genuine
failures (422/5xx) get a clearer "try again shortly, else contact
antagningskansliet" message. Success wording neutralized ("provrepo är
redo") so it reads correctly for both created and reused repos. Issue
template now describes the real alphanumeric application number.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 10:51:47 +02:00
.gitea/issue_template register: reuse existing repo on HTTP 409 instead of dead-ending 2026-07-02 10:51:47 +02:00
.github/workflows register: reuse existing repo on HTTP 409 instead of dead-ending 2026-07-02 10:51:47 +02:00
README.md Initial: issue-driven applicant registration 2026-06-01 11:42:10 +02:00

Antagningsprov 2026 — registrering

Öppna en issue per prov du vill ta. Botten skapar automatiskt en personlig kopia åt dig och svarar med länken.

Så här gör du

  1. Skapa ett konto på https://git.antagning.chas-lab.dev/ (om du inte redan har ett).
  2. Klicka på Issues ovan → New Issue → välj formuläret Registrera prov.
  3. Fyll i ditt ansökningsnummer (från yh-antagning.se) och välj provet du vill ta (C, JavaScript eller Bash).
  4. Skicka in. Inom någon minut svarar botten med en länk till din personliga provrepo.
  5. Logga in, klona den repon, jobba med uppgiften, och pusha. Läs provets README.md för instruktioner.
  6. När du är klar med ett prov, ändra "submitted": false till true i filen student.json och pusha — då rättas provet officiellt.

Vill du ta flera prov?

Öppna en issue per prov. Du får en separat repo per (prov, ansökningsnummer).

Hjälp

Hittar du inte botten-svaret efter några minuter, eller fick du ett felmeddelande? Kontakta antagningskansliet — vi tittar.


Inside this repo (for staff)

This is the registration entrypoint for the 2026 antagningsprov. Issue-driven self-serve registration: an applicant opens a registration issue → workflow generates their personal exam repo from the matching template → applicant added as collaborator → applicant row appended to applicants.csv in antagning-2026/grading-trusted → issue closed with the URL.

Required secret

REGISTER_BOT_TOKEN — a Forgejo PAT with:

  • write:repository on the antagning-2026 org (to create repos from templates + add collaborators).
  • write:repository on antagning-2026/grading-trusted (to commit applicants.csv rows).

Configure via Repo Settings → Actions → Secrets, or via API: PUT /api/v1/repos/antagning-2026/register/actions/secrets/REGISTER_BOT_TOKEN with body {"data":"<token>"}.

Failure modes

  • Invalid ansökningsnummer / exam → workflow comments an error and leaves the issue open for the applicant to edit.
  • Repo create fails (template missing, name clash) → comment with HTTP status; issue left open for staff investigation.
  • Already-registered duplicate → applicants.csv dedupes on (ansok, exam), keeping the newest row. Applicant gets a new repo URL each time they re-register; old repos are NOT auto- deleted (staff cleanup if needed).