Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/actions-lock.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
25fc4c7e69e778e20bdc9eb0cc96367e block-merge-freeze.yml
5a7b85f72877c560683ba523ffad11cc block-unconventional-commits.yml
19ab9c47c8d96de93f37fab242c398cc block-unconventional-commits.yml
e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml
2581a67c5bcdcd570427e6d51db767d7 fixup.yml
870b483dbcbca59479211270d61546dd lint-php-cs.yml
ee2b04d185b82fe7dd6fe6d83c6c7b45 lint-php.yml
5cb2cca6386e45c0c9061192798b37a8 phpunit-mariadb.yml
d676be1ed03142832d8e712962f5961c phpunit-mysql.yml
ec26ef77882d1c19cba1ce168f927c2b phpunit-oci.yml
e92532f6ac32d39a1ff5c5d57b9686ba phpunit-pgsql.yml
9e8a660a88b8253f33593880710f1df3 phpunit-sqlite.yml
3c4a096b3b7dbaef0f8e5190ffe13518 pr-feedback.yml
20b5d0d45766e3793f19c9c0c8d05140 psalm.yml
3975dc58817119d596a8f6ed190352ce reuse.yml
9799b1a6a842b5c0076b76de651a0e0d sync-workflow-templates.yml
4b40dd0073e16f74dd04e6d49dcc043d lint-php-cs.yml
cfb31e47b6e9ab65e76c89b028754a4e lint-php.yml
076e72a19e7bdf35ac5b2abee0198c43 phpunit-mariadb.yml
8fab08ac7da700ee304af0bf3c18b3a3 phpunit-mysql.yml
bbe9834ddb89207caf5e19d79ebb3672 phpunit-oci.yml
256bf1dead4ef8479e9ce7433f871548 phpunit-pgsql.yml
4ca2c2c4b1a73182667bab908e57c185 phpunit-sqlite.yml
d1821b8a816578070ed8fd018f321f6d pr-feedback.yml
6dc046dfbca5dc65d938265c518fcac4 psalm.yml
2dbec18233063b42f4d8e03bbb43671c reuse.yml
94c65e30a77686c079c6dfa54a008440 sync-workflow-templates.yml
a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml
39db87018db395caf41007931817cdbd update-nextcloud-ocp.yml
023b664746d1f2e09a9aaaac772ff7f5 lint-info-xml.yml
f5632e6d28c6afca9d4d46131fb48d57 update-nextcloud-ocp.yml
43fd0c5fb704cabc5f11cdfaf513236d lint-info-xml.yml
aff9f466debc652013b43d1a11b32a0b npm-audit-fix.yml
28dcf55e283b85c292fea0d0b2a15a8a npm-build.yml
2 changes: 1 addition & 1 deletion .github/workflows/block-unconventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-info-xml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: info.xml lint
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
sparse-checkout: |
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -43,10 +43,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
- name: Remove nextcloud/ocp
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i

- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0

- name: Lint
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
4 changes: 2 additions & 2 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
php-max: ${{ steps.versions.outputs.php-max }}
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ jobs:
matrix:
branches:
- ${{ github.event.repository.default_branch }}
- 'stable34'
- 'stable33'
- 'stable32'

name: npm-audit-fix-${{ matrix.branches }}

steps:
- name: Checkout
id: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ matrix.branches }}
Expand All @@ -46,7 +49,7 @@ jobs:
fallbackNpm: '^11.3'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: changes
continue-on-error: true
with:
Expand All @@ -53,7 +53,7 @@ jobs:
name: NPM build
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -65,7 +65,7 @@ jobs:
fallbackNpm: '^11.3'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -43,7 +43,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: changes
continue-on-error: true
with:
Expand Down Expand Up @@ -92,15 +92,15 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}
Expand Down Expand Up @@ -129,13 +129,17 @@ jobs:
with:
files: apps/${{ env.APP_NAME }}/composer.json

- name: Set up dependencies
- name: Remove nextcloud/ocp
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i

- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: apps/${{ env.APP_NAME }}
Comment on lines +132 to +142

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add missing condition to Install composer dependencies step.

By splitting the dependency setup into two separate steps, the Install composer dependencies step lost the condition that ensures composer.json exists. If composer.json is missing (which is a valid state for some apps), the ramsey/composer-install action will fail and break the CI run. Additionally, the comment copied from the PHPUnit step should be corrected.

  • .github/workflows/phpunit-mariadb.yml#L132-L142: Add the missing if condition and fix the comment.
  • .github/workflows/phpunit-mysql.yml#L130-L140: Add the missing if condition and fix the comment.
  • .github/workflows/phpunit-oci.yml#L137-L147: Add the missing if condition and fix the comment.
  • .github/workflows/phpunit-pgsql.yml#L128-L138: Add the missing if condition and fix the comment.
  • .github/workflows/phpunit-sqlite.yml#L117-L127: Add the missing if condition and fix the comment.
💻 Proposed fix
       - name: Remove nextcloud/ocp
-        # Only run if phpunit config file exists
+        # Only run if composer config file exists
         if: steps.check_composer.outputs.files_exists == 'true'
         working-directory: apps/${{ env.APP_NAME }}
         run: |
           composer remove nextcloud/ocp --dev --no-scripts
 
       - name: Install composer dependencies
+        if: steps.check_composer.outputs.files_exists == 'true'
         uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
         with:
           working-directory: apps/${{ env.APP_NAME }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Remove nextcloud/ocp
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i
- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: apps/${{ env.APP_NAME }}
- name: Remove nextcloud/ocp
# Only run if composer config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
- name: Install composer dependencies
if: steps.check_composer.outputs.files_exists == 'true'
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: apps/${{ env.APP_NAME }}
📍 Affects 5 files
  • .github/workflows/phpunit-mariadb.yml#L132-L142 (this comment)
  • .github/workflows/phpunit-mysql.yml#L130-L140
  • .github/workflows/phpunit-oci.yml#L137-L147
  • .github/workflows/phpunit-pgsql.yml#L128-L138
  • .github/workflows/phpunit-sqlite.yml#L117-L127


- name: Set up Nextcloud
env:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix: ${{ steps.versions.outputs.sparse-matrix }}
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -44,7 +44,7 @@ jobs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: changes
continue-on-error: true
with:
Expand Down Expand Up @@ -90,15 +90,15 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}
Expand Down Expand Up @@ -127,13 +127,17 @@ jobs:
with:
files: apps/${{ env.APP_NAME }}/composer.json

- name: Set up dependencies
- name: Remove nextcloud/ocp
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i

- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: apps/${{ env.APP_NAME }}

- name: Set up Nextcloud
env:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -43,7 +43,7 @@ jobs:
src: ${{ steps.changes.outputs.src }}

steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: changes
continue-on-error: true
with:
Expand Down Expand Up @@ -102,15 +102,15 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}
Expand All @@ -134,13 +134,17 @@ jobs:
with:
files: apps/${{ env.APP_NAME }}/composer.json

- name: Set up dependencies
- name: Remove nextcloud/ocp
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i

- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: apps/${{ env.APP_NAME }}

- name: Set up Nextcloud
env:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -43,7 +43,7 @@ jobs:
src: ${{ steps.changes.outputs.src }}

steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
id: changes
continue-on-error: true
with:
Expand Down Expand Up @@ -93,15 +93,15 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}
Expand All @@ -125,13 +125,17 @@ jobs:
with:
files: apps/${{ env.APP_NAME }}/composer.json

- name: Set up dependencies
- name: Remove nextcloud/ocp
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: |
composer remove nextcloud/ocp --dev --no-scripts
composer i

- name: Install composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: apps/${{ env.APP_NAME }}

- name: Set up Nextcloud
env:
Expand Down
Loading
Loading