From 55f00a69e6797e233433d6b27647c7731cdfe9bf Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Feb 2025 10:54:49 +0100 Subject: [PATCH 1/3] ci: Add a summary for integration Signed-off-by: Joas Schilling --- .github/workflows/integration.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 6787cff..60b8ee4 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -125,3 +125,17 @@ jobs: if: always() run: | cat data/nextcloud.log + + summary: + permissions: + contents: none + runs-on: ubuntu-latest-low + needs: [integration] + + if: always() + + name: integration-summary + + steps: + - name: Summary status + run: if ${{ needs.integration.result != 'success' }}; then exit 1; fi From 9ce8435119a05e0a84bd7f7f4778a077947f2ea2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Feb 2025 11:03:39 +0100 Subject: [PATCH 2/3] ci: Checkout submodule correctly Signed-off-by: Joas Schilling --- .github/workflows/integration.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 60b8ee4..e24467e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -60,16 +60,13 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false + submodules: recursive repository: nextcloud/server ref: ${{ matrix.server-versions }} - - name: Checkout submodules - shell: bash - run: | - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - cd build/integration && composer require --dev phpunit/phpunit:~9 + - name: Set up integration dependencies + working-directory: build/integration + run: composer require --dev phpunit/phpunit:~9 - name: Checkout app uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 From 635671fe5cc47c5d4785abddd69d4c90218560c4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Feb 2025 11:10:07 +0100 Subject: [PATCH 3/3] fix: Fix psalm error Signed-off-by: Joas Schilling --- lib/Operation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Operation.php b/lib/Operation.php index 1fbd20e..45e2063 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -73,7 +73,7 @@ public function checkFileAccess(IStorage $storage, string $path, bool $isDir = f $this->nestingLevel--; if (!empty($match)) { - $e = new \RuntimeException('Access denied for path ' . $path . ' that is ' . ($isDir ? '' : 'not ') . 'a directory and matches rules: ' . json_encode($match)); + $e = new \RuntimeException('Access denied for path ' . $path . ' that is ' . ($isDir ? '' : 'not ') . 'a directory and matches rules: ' . (string)json_encode($match)); $this->logger->debug($e->getMessage(), ['exception' => $e]); // All Checks of one operation matched: prevent access throw new ForbiddenException('Access denied by access control', false);