From d199deab549256f07cd6595dde7fdb22e996de73 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Tue, 20 Aug 2024 10:23:15 +0200 Subject: [PATCH] Update token to have the project:read permission --- .github/workflows/sync-working-groups.yml | 4 +--- working-groups/main.java | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-working-groups.yml b/.github/workflows/sync-working-groups.yml index e617844d5a2..24ab4f01f9d 100644 --- a/.github/workflows/sync-working-groups.yml +++ b/.github/workflows/sync-working-groups.yml @@ -8,8 +8,6 @@ on: - cron: '0 * * * *' workflow_dispatch: -permissions: read-all - jobs: sync: runs-on: ubuntu-latest @@ -31,7 +29,7 @@ jobs: jbangargs: --verbose -Dworking-groups.output=_data/wg.yaml env: JBANG_REPO: /root/.jbang/repository - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.SYNC_WORKING_GROUP_TOKEN }} - name: Configure Git author run: | diff --git a/working-groups/main.java b/working-groups/main.java index 91a02c44390..381720199cd 100644 --- a/working-groups/main.java +++ b/working-groups/main.java @@ -118,6 +118,10 @@ public List getAllProjectsForOrganization(String org) throws ExecutionExc } """, variables); + + System.out.println("Response: " + response); + System.out.println("Errors: " + response.getErrors()); + System.out.println("Data:\n" + response.getData()); JsonArray array = response.getData().getJsonObject("organization").getJsonObject("projectsV2") .getJsonArray("nodes"); for (JsonValue value : array) {