From 5d8d73097caf10a0e3419d5ff11c3bdac40fa547 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Tue, 29 Jul 2025 14:15:17 +0200 Subject: [PATCH] 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. --- .github/copilot-instructions.md | 2 +- .github/workflows/copilot-setup-steps.yml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 6d0c532..2406cc6 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -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 diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index d0e2a8a..30b0aab 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -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"