From 2a2e8a6361e82a328f28793081c457c01aac163a Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 28 Apr 2026 13:34:56 +0200 Subject: [PATCH 1/2] Follow-up fixes to updater-schemas workflow See #491 --- .github/workflows/update-schemas.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-schemas.yml b/.github/workflows/update-schemas.yml index e8fa94d..b88c81a 100644 --- a/.github/workflows/update-schemas.yml +++ b/.github/workflows/update-schemas.yml @@ -33,7 +33,7 @@ jobs: - name: Commit and Create Pull Request env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} PR_BODY: | **This is an automated pull-request** @@ -47,10 +47,9 @@ jobs: git checkout -b update-schemas git add assets/ git commit -m "Update schema fallback files" - git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git git push -f origin update-schemas - PR_NUMBER=$(gh pr list --head update-schemas --json number --jq '.[0].number') + PR_NUMBER=$(gh pr list --head update-schemas --json number --jq '.[0].number // empty') if [ -z "$PR_NUMBER" ]; then gh pr create \ --title "Update schema fallback files" \ @@ -59,6 +58,13 @@ jobs: --base "${{ github.event.repository.default_branch }}" \ --head "update-schemas" \ --reviewer "swissspidy" + else + gh pr edit "$PR_NUMBER" \ + --title "Update schema fallback files" \ + --body "$PR_BODY" \ + --add-label "scope:distribution" \ + --base "${{ github.event.repository.default_branch }}" fi + fi From 895cbb57705c02a4cf934dd2f51709004299a5f7 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 28 Apr 2026 13:54:24 +0200 Subject: [PATCH 2/2] Set permissions --- .github/workflows/update-schemas.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-schemas.yml b/.github/workflows/update-schemas.yml index b88c81a..6822fae 100644 --- a/.github/workflows/update-schemas.yml +++ b/.github/workflows/update-schemas.yml @@ -17,6 +17,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: write + pull-requests: write + jobs: update-schemas: #----------------------------------------------------------