copilot instructions: fixes on createsuperuser

For some reason the env-vars were missed; pulling them closer hopefully fixes
this (and makes more sense generally)

the `|| true` pattern was removed: it just hides problems.

also: different username (email) to stick closer to what we do elsewhere.
This commit is contained in:
Klaas van Schelven
2025-07-29 14:15:17 +02:00
parent 735f5ceaa0
commit 5d8d73097c
2 changed files with 6 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ Test the frontend by running the server like so and checking in a browser:
`python manage.py runserver` (uses `bugsink.settings.development`)
(an admin/admin user is available in your environment)
(an admin user is available in your environment. login with admin@example.org/admin)
### Before committing

View File

@@ -17,9 +17,6 @@ jobs:
env:
DJANGO_SETTINGS_MODULE: bugsink.settings.development
SAMPLES_DIR: ${{ github.workspace }}/event-samples
DJANGO_SUPERUSER_USERNAME: admin
DJANGO_SUPERUSER_EMAIL: admin@example.com
DJANGO_SUPERUSER_PASSWORD: admin
steps:
- name: Check out code
uses: actions/checkout@v4
@@ -49,10 +46,12 @@ jobs:
# Ensures the SQLite database is initialized.
- name: Create superuser
env:
DJANGO_SUPERUSER_USERNAME: admin@example.com
DJANGO_SUPERUSER_EMAIL: admin@example.com
DJANGO_SUPERUSER_PASSWORD: admin
run: |
python manage.py createsuperuser --noinput || true
# Creates a default admin user so Copilot can log in if needed.
# `|| true` prevents failure if the user already exists.
python manage.py createsuperuser --noinput
- name: Check out event-samples outside workspace
# by using a plain-old `git-clone` we are able to "ecape from the working dir"