Compare commits

..

2 Commits

Author SHA1 Message Date
Robin Windey afd6b9fa3f tmp 2026-01-28 19:27:38 +00:00
Robin Windey 742e08fc80 tmp 2025-12-25 20:19:52 +00:00
3244 changed files with 68809 additions and 69422 deletions
+7 -2
View File
@@ -77,11 +77,16 @@ RUN (getent passwd 1000 && userdel -r $(getent passwd 1000 | cut -d: -f1)) || tr
(getent group 1000 && groupdel $(getent group 1000 | cut -d: -f1)) || true && \
groupadd -g 1000 ${APACHE_RUN_GROUP} && \
useradd -u 1000 -g 1000 -ms /bin/bash ${APACHE_RUN_USER} && \
adduser ${APACHE_RUN_USER} sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
adduser ${APACHE_RUN_USER} sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
sed -ri "s/^export APACHE_RUN_USER=.*$/export APACHE_RUN_USER=${APACHE_RUN_USER}/" "/etc/apache2/envvars" && \
sed -ri "s/^export APACHE_RUN_GROUP=.*$/export APACHE_RUN_GROUP=${APACHE_RUN_GROUP}/" "/etc/apache2/envvars"
# Setup HaRP proxy in Apache
COPY apache.conf /etc/apache2/sites-enabled/000-default.conf
RUN a2enmod proxy proxy_http headers && \
service apache2 restart
USER devcontainer
# NVM
+11
View File
@@ -74,3 +74,14 @@ The Apache webserver is already configured to automatically try to connect to a
listening on port `9003`. To start the VSCode debugger process, use the delivered debug profile `Listen for XDebug`.
After you started the VSCode debugger, just navigate to the appropriate Nextcloud URL to get your
debug hits.
## Developing with `app_api` and HaRP
The Devcontainer already comes with [HaRP](https://github.com/nextcloud/HaRP) preconfigured so that you can directly
start developing the [`app_api`](https://github.com/nextcloud/app_api) app. The only thing you need to do is execute `./.devcontainer/scripts/setup-app-api-dev.sh` once after the Devcontainer started.
This script will:
1. Clone the `app_api` repository into the `/var/www/html/apps` folder of the Devcontainer instance.
2. Enable the app via CLI (`php occ app:enable app_api`).
3. Register the HaRP daemon which fits to the Devcontainer configuration.
+39
View File
@@ -0,0 +1,39 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
# Proxy HaRP
<Location /exapps/>
ProxyPreserveHost On
ProxyPass http://appapi-harp:8780/exapps/ nocanon
ProxyPassReverse http://appapi-harp:8780/exapps/
RequestHeader set X-Real-IP expr=%{REMOTE_ADDR}
RequestHeader set X-Forwarded-For expr=%{REMOTE_ADDR}
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
</Location>
</VirtualHost>
+4 -2
View File
@@ -12,9 +12,11 @@ $CONFIG = [
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'example.com',
'mail_smtphost' => 'localhost',
'mail_smtphost' => 'mailhog',
'mail_smtpport' => '1025',
'memcache.local' => '\OC\Memcache\APCu',
'trusted_domains' => ['nextclouddev'],
'loglevel' => 1,
];
if(is_string($codespaceName) && !empty($codespaceName) && is_string($codespaceDomain) && !empty($codespaceDomain)) {
@@ -22,5 +24,5 @@ if(is_string($codespaceName) && !empty($codespaceName) && is_string($codespaceDo
$CONFIG['overwritehost'] = $host;
$CONFIG['overwrite.cli.url'] = 'https://' . $host;
$CONFIG['overwriteprotocol'] = 'https';
$CONFIG['trusted_domains'] = [ $host ];
$CONFIG['trusted_domains'][] = $host;
}
+2 -3
View File
@@ -12,11 +12,10 @@
"customizations": {
"vscode": {
"extensions": [
"felixfbecker.php-debug",
"felixfbecker.php-intellisense",
"ms-azuretools.vscode-docker",
"xdebug.php-debug",
"donjayamanne.githistory"
"donjayamanne.githistory",
"bmewburn.vscode-intelephense-client"
],
"settings": {
"php.suggest.basic": false
+39 -5
View File
@@ -3,6 +3,7 @@
services:
nextclouddev:
build: .
container_name: nextclouddev
volumes:
- .:/workspace:cached
- /var/run/docker.sock:/var/run/docker-host.sock
@@ -10,8 +11,8 @@ services:
command: /var/www/html/.devcontainer/entrypoint.sh
ports:
- 80:80
- 8080:8080
- 8025:8025
networks:
- nextclouddev-network
db:
image: postgres
@@ -21,17 +22,50 @@ services:
PGDATA: /data/postgres
volumes:
- db:/data/postgres
network_mode: service:nextclouddev
ports:
- 5432:5432
networks:
- nextclouddev-network
adminer:
image: adminer
restart: always
network_mode: service:nextclouddev
ports:
- 8080:8080
networks:
- nextclouddev-network
mailhog:
image: mailhog/mailhog
restart: always
network_mode: service:nextclouddev
ports:
- 8025:8025
networks:
- nextclouddev-network
appapi-harp:
image: ghcr.io/nextcloud/nextcloud-appapi-harp:release
container_name: appapi-harp
restart: always
environment:
- HP_SHARED_KEY=some_very_secure_password
- NC_INSTANCE_URL=http://nextclouddev
- HP_BLACKLIST_COUNT=10000
- HP_BLACKLIST_WINDOW=1
- HP_LOG_LEVEL=DEBUG
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- certs:/certs
ports:
- 8780:8780
- 8782:8782
networks:
- nextclouddev-network
volumes:
db:
certs:
networks:
nextclouddev-network:
name: nextclouddev-network
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# Clone sources
git clone https://github.com/nextcloud/app_api.git /var/www/html/apps/app_api
# Enable the app
php /var/www/html/occ app:enable app_api
# Register a default HaRP daemon
echo "Registering default HaRP daemon"
php occ app_api:daemon:register \
--set-default \
--net nextclouddev-network \
--harp \
--harp_frp_address "appapi-harp:8782" \
--harp_shared_key "some_very_secure_password" \
--harp_docker_socket_port 24000 \
"harp_proxy_docker" \
"HaRP Proxy (Docker)" \
"docker-install" \
"http" \
"appapi-harp:8780" \
"http://nextclouddev"
+14 -1
View File
@@ -22,7 +22,7 @@ if [[ ! $(sudo -u ${APACHE_RUN_USER} php occ status) =~ installed:[[:space:]]*tr
--verbose \
--database=pgsql \
--database-name=postgres \
--database-host=127.0.0.1 \
--database-host=db \
--database-port=5432 \
--database-user=postgres \
--database-pass=postgres \
@@ -30,4 +30,17 @@ if [[ ! $(sudo -u ${APACHE_RUN_USER} php occ status) =~ installed:[[:space:]]*tr
--admin-pass admin
fi
# Query Docker daemon API via unix socket and write DOCKER_API_VERSION to .bashrc for CLI use
if [ -S /var/run/docker.sock ]; then
sudo chmod 666 /var/run/docker.sock
json="$(curl --silent --unix-socket /var/run/docker.sock http://localhost/version || true)"
api="$(printf '%s' "$json" | php -r '$d=json_decode(stream_get_contents(STDIN), true); echo isset($d["ApiVersion"])?$d["ApiVersion"]:"";')"
if [ -n "$api" ]; then
echo "export DOCKER_API_VERSION=$api" >> ~/.bashrc
echo "Wrote DOCKER_API_VERSION=$api to ~/.bashrc"
else
echo "Warning: could not determine Docker API version after ${max_retries} attempts"
fi
fi
sudo service apache2 restart
+2 -2
View File
@@ -71,8 +71,9 @@ body:
Select Nextcloud Server version.
_Versions not listed here are not maintained and not supported anymore_
options:
- "30"
- "31"
- "32"
- "33"
- "master"
validations:
required: true
@@ -95,7 +96,6 @@ body:
Select PHP engine version serving Nextcloud Server.
_Describe in the "Additional info" section if you chose "Other"._
options:
- "PHP 8.5"
- "PHP 8.4"
- "PHP 8.3"
- "PHP 8.2"
+6 -62
View File
@@ -21,7 +21,7 @@ updates:
- package-ecosystem: composer
directories:
- "/"
- "/vendor-bin/behat"
- "/build/integration"
- "/vendor-bin/cs-fixer"
- "/vendor-bin/openapi-extractor"
- "/vendor-bin/phpunit"
@@ -64,65 +64,6 @@ updates:
- "@vitest/*"
# Latest stable release
# Composer dependencies for linting and testing
- package-ecosystem: composer
target-branch: stable33
directories:
- "/"
- "/vendor-bin/behat"
- "/vendor-bin/cs-fixer"
- "/vendor-bin/openapi-extractor"
- "/vendor-bin/phpunit"
- "/vendor-bin/psalm"
- "/vendor-bin/rector"
schedule:
interval: weekly
day: saturday
time: "03:30"
timezone: Europe/Paris
labels:
- "3. to review"
- "feature: dependencies"
ignore:
# only patch updates on stable branches
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
# frontend dependencies
- package-ecosystem: npm
target-branch: stable33
directories:
- "/"
- "/build/frontend"
- "/build/frontend-legacy"
schedule:
interval: weekly
day: saturday
time: "03:30"
timezone: Europe/Paris
open-pull-requests-limit: 20
labels:
- "3. to review"
- "feature: dependencies"
# Disable automatic rebasing because without a build CI will likely fail anyway
rebase-strategy: "disabled"
groups:
vite:
patterns:
- "vite"
- "@nextcloud/vite-config"
vitest:
patterns:
- "vitest"
- "@vitest/*"
ignore:
# no major updates on stable branches
- dependency-name: "*"
update-types: ["version-update:semver-major"]
# Older stable releases
# Composer dependencies for linting and testing
- package-ecosystem: composer
target-branch: stable32
@@ -136,7 +77,7 @@ updates:
schedule:
interval: weekly
day: saturday
time: "04:30"
time: "03:30"
timezone: Europe/Paris
labels:
- "3. to review"
@@ -146,6 +87,7 @@ updates:
- dependency-name: "*"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
# Latest stable branch
# frontend dependencies
- package-ecosystem: npm
target-branch: stable32
@@ -153,7 +95,7 @@ updates:
schedule:
interval: weekly
day: saturday
time: "04:30"
time: "03:30"
timezone: Europe/Paris
open-pull-requests-limit: 20
labels:
@@ -166,6 +108,8 @@ updates:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
# Older stable releases
# Composer dependencies for linting and testing
- package-ecosystem: composer
target-branch: stable31
+4 -6
View File
@@ -52,14 +52,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -82,14 +81,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -31,7 +31,7 @@ jobs:
- 'version.php'
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
+3 -3
View File
@@ -32,18 +32,18 @@ jobs:
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
with:
category: "/language:${{matrix.language}}"
+2 -2
View File
@@ -103,7 +103,7 @@ jobs:
key: git-repo
- name: Checkout ${{ needs.init.outputs.head_ref }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
# Needed to allow force push later
persist-credentials: true
@@ -124,7 +124,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
cache: npm
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
id: comment-branch
- name: Checkout ${{ steps.comment-branch.outputs.head_ref }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
fetch-depth: 0
+6 -6
View File
@@ -48,7 +48,7 @@ jobs:
exit 1
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
# We need to checkout submodules for 3rdparty
@@ -72,7 +72,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -160,7 +160,7 @@ jobs:
path: ./
- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ needs.init.outputs.nodeVersion }}
@@ -171,7 +171,7 @@ jobs:
run: ./node_modules/cypress/bin/cypress install
- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
uses: cypress-io/github-action@2ad32e649e4db26c07674ebae31a297601dbcbaf # v6.10.8
uses: cypress-io/github-action@7ef72e250a9e564efb4ed4c2433971ada4cc38b4 # v6.10.4
with:
# We already installed the dependencies in the init job
install: false
@@ -195,7 +195,7 @@ jobs:
SETUP_TESTING: ${{ matrix.containers == 'setup' && 'true' || '' }}
- name: Upload snapshots and videos
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: always()
with:
name: snapshots_${{ matrix.containers }}
@@ -218,7 +218,7 @@ jobs:
run: docker exec nextcloud-e2e-test-server_${{ env.APP_NAME }} tar -cvjf - data > data.tar
- name: Upload data archive
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: failure() && matrix.containers != 'component'
with:
name: nc_data_${{ matrix.containers }}
+6 -17
View File
@@ -29,22 +29,12 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
files-external-ftp:
runs-on: ubuntu-latest
@@ -65,7 +55,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -81,8 +71,7 @@ jobs:
if [[ "${{ matrix.ftpd }}" == 'pure-ftpd' ]]; then docker run --name ftp -d --net host -e "PUBLICHOST=localhost" -e FTP_USER_NAME=test -e FTP_USER_PASS=test -e FTP_USER_HOME=/home/test -v /tmp/ftp:/home/test -v /tmp/ftp:/etc/pure-ftpd/passwd stilliard/pure-ftpd; fi
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -115,14 +104,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-ftp
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-ftp
+10 -22
View File
@@ -29,22 +29,12 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
files-external-s3-minio:
runs-on: ubuntu-latest
@@ -74,14 +64,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -115,14 +104,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-s3
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-s3
@@ -163,14 +152,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -197,14 +185,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-s3
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-s3
+6 -17
View File
@@ -29,22 +29,12 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
files-external-sftp:
runs-on: ubuntu-latest
@@ -65,7 +55,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -77,8 +67,7 @@ jobs:
if [[ '${{ matrix.sftpd }}' == 'openssh' ]]; then docker run -p 2222:22 --name sftp -d -v /tmp/sftp:/home/test atmoz/sftp 'test:test:::data'; fi
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -104,14 +93,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-sftp
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-sftp
@@ -29,22 +29,12 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
files-external-smb-kerberos:
runs-on: ubuntu-latest
@@ -56,13 +46,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Checkout user_saml
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/user_saml
@@ -117,7 +107,7 @@ jobs:
echo "$FILEPATH:"
docker exec --user 33 apache cat $FILEPATH
smb-kerberos-sso-summary:
sftp-summary:
runs-on: ubuntu-latest-low
needs: [changes, files-external-smb-kerberos]
+7 -24
View File
@@ -29,22 +29,12 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
files-external-smb:
runs-on: ubuntu-latest
@@ -63,26 +53,19 @@ jobs:
services:
samba:
image: ghcr.io/servercontainers/samba:smbd-only-a3.18.0-s4.18.2-r0
env:
ACCOUNT_test: test
UID_test: 1000
SAMBA_VOLUME_CONFIG_test: "[public]; path=/tmp; valid users = test; guest ok = no; read only = no; browseable = yes"
options: >-
--health-cmd=true
image: ghcr.io/nextcloud/continuous-integration-samba:latest # zizmor: ignore[unpinned-images]
ports:
- 445:445
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -116,14 +99,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-smb
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-smb
+6 -17
View File
@@ -29,22 +29,12 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
files-external-webdav-apache:
runs-on: ubuntu-latest
@@ -70,14 +60,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -108,14 +97,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-webdav
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-webdav
+5 -17
View File
@@ -29,22 +29,11 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'apps/files_external/**'
- 'vendor/**'
- 'vendor-bin/**'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
files-external-generic:
runs-on: ubuntu-latest
@@ -64,14 +53,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -97,14 +85,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-generic
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-generic
@@ -24,14 +24,14 @@ jobs:
require: write
- name: Checkout github_helper
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/github_helper
path: github_helper
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
path: server
@@ -74,7 +74,6 @@ jobs:
- name: Set up php 8.2
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: 8.2
coverage: none
+3 -4
View File
@@ -53,14 +53,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -71,7 +70,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: LizardByte/actions/actions/setup_python@e6bc045033a5614035b66daafc38ff86faecb23a # v2026.116.208
uses: LizardByte/actions/actions/setup_python@329b1bcefe1cbe1ef289177471c9f2b2af98e6ca # v2025.1028.23217
with:
python-version: '2.7'
+2 -3
View File
@@ -52,14 +52,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
+8 -18
View File
@@ -27,23 +27,14 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- 'vendor/**'
- 'vendor-bin/**'
- '**/*.php'
- '**/lib/**'
- '**/tests/**'
- '**/vendor-bin/**'
- 'build/integration/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- 'build/integration/**'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
integration-s3-primary:
runs-on: ubuntu-latest
@@ -76,14 +67,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
+4 -5
View File
@@ -97,14 +97,14 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Checkout Talk app
if: ${{ matrix.test-suite == 'videoverification_features' }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/spreed
@@ -113,7 +113,7 @@ jobs:
- name: Checkout Activity app
if: ${{ matrix.test-suite == 'sharing_features' }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/activity
@@ -121,8 +121,7 @@ jobs:
ref: ${{ matrix.activity-versions }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
+2 -2
View File
@@ -56,7 +56,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -68,7 +68,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+1 -2
View File
@@ -48,13 +48,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up php
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: 8.2
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
+1 -2
View File
@@ -53,13 +53,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -37,7 +37,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+2 -2
View File
@@ -59,7 +59,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -71,7 +71,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+3 -3
View File
@@ -58,7 +58,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -70,7 +70,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -90,7 +90,7 @@ jobs:
run: npm run test:coverage
- name: Collect coverage
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./coverage/lcov.info,./coverage/legacy/lcov.info
+2 -2
View File
@@ -56,7 +56,7 @@ jobs:
name: NPM build
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -68,7 +68,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+3 -4
View File
@@ -26,7 +26,6 @@ jobs:
matrix:
branches:
- ${{ github.event.repository.default_branch }}
- 'stable33'
- 'stable32'
- 'stable31'
@@ -35,7 +34,7 @@ jobs:
steps:
- name: Checkout
id: checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
ref: ${{ matrix.branches }}
@@ -49,7 +48,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -70,7 +69,7 @@ jobs:
- name: Create Pull Request
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(deps): Fix npm audit'
+11 -18
View File
@@ -29,22 +29,16 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- '**/appinfo/**'
- '**/lib/**'
- '**/templates/**'
- '**/tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
azure-primary-tests:
runs-on: ubuntu-latest
@@ -58,7 +52,7 @@ jobs:
php-versions: ['8.2', '8.3']
include:
- php-versions: '8.4'
coverage: ${{ github.event_name != 'pull_request' }}
coverage: true
name: php${{ matrix.php-versions }}-azure
@@ -79,14 +73,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -117,14 +110,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-azure
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-azure
+11 -18
View File
@@ -29,22 +29,16 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- '**/appinfo/**'
- '**/lib/**'
- '**/templates/**'
- '**/tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
s3-primary-tests-minio:
runs-on: ubuntu-latest
@@ -58,7 +52,7 @@ jobs:
php-versions: ['8.2']
include:
- php-versions: '8.3'
coverage: ${{ github.event_name != 'pull_request' }}
coverage: true
name: php${{ matrix.php-versions }}-s3
@@ -80,14 +74,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -123,14 +116,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-s3
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-s3
+11 -18
View File
@@ -29,22 +29,16 @@ jobs:
src:
- '.github/workflows/**'
- '3rdparty/**'
- '**/appinfo/**'
- '**/lib/**'
- '**/templates/**'
- '**/tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'
- 'apps/files/lib/**'
- 'apps/files/tests/**'
- 'apps/files_external/**'
- 'apps/files_sharing/lib/**'
- 'apps/files_sharing/tests/**'
- 'apps/files_trashbin/lib/**'
- 'apps/files_trashbin/tests/**'
- 'apps/files_versions/lib/**'
- 'apps/files_versions/tests/**'
- 'lib/private/Files/**'
- 'lib/public/Files/**'
- 'tests/lib/Files/**'
- '**.php'
swift-primary-tests:
runs-on: ubuntu-latest
@@ -58,7 +52,7 @@ jobs:
php-versions: ['8.2']
include:
- php-versions: '8.3'
coverage: ${{ github.event_name != 'pull_request' }}
coverage: true
name: php${{ matrix.php-versions }}-swift
@@ -77,14 +71,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -113,14 +106,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-swift
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-swift
+1 -2
View File
@@ -26,13 +26,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up php
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: '8.2'
extensions: ctype, curl, dom, fileinfo, gd, json, libxml, mbstring, openssl, pcntl, pdo, posix, session, simplexml, xml, xmlreader, xmlwriter, zip, zlib
+2 -3
View File
@@ -35,7 +35,7 @@ jobs:
exit 1
- name: Checkout server before PR
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -43,7 +43,6 @@ jobs:
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -99,7 +98,7 @@ jobs:
- name: Upload profiles
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: profiles
path: |
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
+5 -6
View File
@@ -60,13 +60,13 @@ jobs:
fail-fast: false
matrix:
php-versions: ['8.2']
mariadb-versions: ['10.6']
mariadb-versions: ['10.6', '10.11', '11.4', '11.8']
include:
- php-versions: '8.3'
mariadb-versions: '10.11'
coverage: ${{ github.event_name != 'pull_request' }}
- php-versions: '8.4'
mariadb-versions: '11.4'
mariadb-versions: '11.8'
- php-versions: '8.5'
mariadb-versions: '11.8'
@@ -92,14 +92,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -132,14 +131,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-mariadb
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-mariadb
+4 -5
View File
@@ -72,14 +72,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -104,14 +103,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-memcached
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-memcached
+4 -5
View File
@@ -121,14 +121,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -162,14 +161,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-mysql
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-mysql
+4 -5
View File
@@ -60,7 +60,7 @@ jobs:
fail-fast: false
matrix:
php-versions: ['8.2']
mysql-versions: ['8.0']
mysql-versions: ['8.0', '8.4']
include:
- mysql-versions: '8.0'
php-versions: '8.3'
@@ -92,14 +92,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -132,14 +131,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-mysql
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-mysql
+4 -5
View File
@@ -75,14 +75,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -110,14 +109,14 @@ jobs:
- name: Upload nodb code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.nodb.xml
flags: phpunit-nodb
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-nodb
@@ -72,14 +72,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
+5 -4
View File
@@ -64,6 +64,8 @@ jobs:
php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
- oracle-versions: '21'
php-versions: '8.2'
- oracle-versions: '23'
php-versions: '8.3'
- oracle-versions: '23'
php-versions: '8.4'
@@ -99,14 +101,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -132,14 +133,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-oci
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-oci
+4 -5
View File
@@ -61,7 +61,7 @@ jobs:
matrix:
php-versions: ['8.2']
# To keep the matrix smaller we ignore PostgreSQL versions in between as we already test the minimum and the maximum
postgres-versions: ['14']
postgres-versions: ['14', '18']
include:
- php-versions: '8.3'
postgres-versions: '18'
@@ -92,14 +92,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -127,14 +126,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-postgres
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-postgres
+3 -4
View File
@@ -75,14 +75,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
timeout-minutes: 5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -111,14 +110,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-sqlite
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-sqlite
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest-low
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
issues: write
steps:
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v9
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v9
with:
repo-token: ${{ secrets.COMMAND_BOT_PAT }}
stale-issue-message: >
+9 -14
View File
@@ -15,7 +15,6 @@ on:
permissions:
contents: read
security-events: write
concurrency:
group: static-code-analysis-${{ github.head_ref || github.run_id }}
@@ -29,14 +28,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
@@ -61,14 +59,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
@@ -86,7 +83,7 @@ jobs:
- name: Upload Security Analysis results to GitHub
if: always()
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3
with:
sarif_file: results.sarif
@@ -97,14 +94,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
@@ -129,14 +125,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
timeout-minutes: 5
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+3 -3
View File
@@ -17,12 +17,12 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['master', 'stable33', 'stable32', 'stable31', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
branches: ['master', 'stable32', 'stable31', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
name: update-ca-certificate-bundle-${{ matrix.branches }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
ref: ${{ matrix.branches }}
@@ -32,7 +32,7 @@ jobs:
run: curl --etag-compare build/ca-bundle-etag.txt --etag-save build/ca-bundle-etag.txt --output resources/config/ca-bundle.crt https://curl.se/ca/cacert.pem
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(security): Update CA certificate bundle'
@@ -17,12 +17,12 @@ jobs:
strategy:
fail-fast: false
matrix:
branches: ['master', 'stable33', 'stable32', 'stable31', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
branches: ['master', 'stable32', 'stable31', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
name: update-code-signing-crl-${{ matrix.branches }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
ref: ${{ matrix.branches }}
@@ -35,7 +35,7 @@ jobs:
run: openssl crl -verify -in resources/codesigning/root.crl -CAfile resources/codesigning/root.crt -noout
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(security): Update code signing revocation list'
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest-low
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -107,7 +107,7 @@ jobs:
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
if: steps.update-files.outputs.CHANGES_MADE == 'true'
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
-29
View File
@@ -1,29 +0,0 @@
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-only
# Files removed at build time
# Global exclude
.editorconfig
.git
.git-blame-ignore-revs
.gitattributes
.github
.gitignore
.gitmodules
.idea
.l10nignore
.nextcloudignore
.noopenapi
.tx
cypress
tests
# Server specific
/.devcontainer
/__mocks__
/__tests__
/autotest*.sh
/build
/config/config.php
/contribute
/data
+1 -1
View File
@@ -11,7 +11,7 @@
**A safe home for all your data.**
![](https://raw.githubusercontent.com/nextcloud/screenshots/master/nextcloud-hub-25-files.png)
![](https://raw.githubusercontent.com/nextcloud/screenshots/master/nextcloud-hub-files-25-preview.png)
## Why is this so awesome? 🤩
+2 -2
View File
@@ -10,7 +10,7 @@
<name>Auditing / Logging</name>
<summary>Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions.</summary>
<description>Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions.</description>
<version>1.24.0</version>
<version>1.23.0</version>
<licence>agpl</licence>
<author>Nextcloud</author>
<namespace>AdminAudit</namespace>
@@ -20,7 +20,7 @@
<category>monitoring</category>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<dependencies>
<nextcloud min-version="34" max-version="34"/>
<nextcloud min-version="33" max-version="33"/>
</dependencies>
<background-jobs>
<job>OCA\AdminAudit\BackgroundJobs\Rotate</job>
@@ -18,7 +18,7 @@ class TagManagement extends Action {
$this->log('System tag "%s" (%s, %s) created',
[
'name' => $tag->getName(),
'visibility' => $tag->isUserVisible() ? 'visible' : 'invisible',
'visbility' => $tag->isUserVisible() ? 'visible' : 'invisible',
'assignable' => $tag->isUserAssignable() ? 'user assignable' : 'system only',
],
['name', 'visibility', 'assignable']
@@ -148,6 +148,18 @@ class SharingEventListener extends Action implements IEventListener {
'id',
]
),
IShare::TYPE_SCIENCEMESH => $this->log(
'The %s "%s" with ID "%s" has been shared to the sciencemesh user "%s" with permissions "%s" (Share ID: %s)',
$params,
[
'itemType',
'path',
'itemSource',
'shareWith',
'permissions',
'id',
]
),
default => null
};
}
@@ -262,6 +274,17 @@ class SharingEventListener extends Action implements IEventListener {
'id',
]
),
IShare::TYPE_SCIENCEMESH => $this->log(
'The %s "%s" with ID "%s" has been unshared from the sciencemesh user "%s" (Share ID: %s)',
$params,
[
'itemType',
'fileTarget',
'itemSource',
'shareWith',
'id',
]
),
default => null
};
}
+2 -2
View File
@@ -9,7 +9,7 @@
<name>Cloud Federation API</name>
<summary>Enable clouds to communicate with each other and exchange data</summary>
<description>The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data.</description>
<version>1.18.0</version>
<version>1.17.0</version>
<licence>agpl</licence>
<author>Bjoern Schiessle</author>
<namespace>CloudFederationAPI</namespace>
@@ -19,6 +19,6 @@
<category>integration</category>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<dependencies>
<nextcloud min-version="34" max-version="34"/>
<nextcloud min-version="33" max-version="33"/>
</dependencies>
</info>
+1 -10
View File
@@ -25,15 +25,6 @@ return [
'url' => '/invite-accepted',
'verb' => 'POST',
'root' => '/ocm',
],
// needs to be kept at the bottom of the list
[
'name' => 'OCMRequest#manageOCMRequests',
'url' => '/{ocmPath}',
'requirements' => ['ocmPath' => '.*'],
'verb' => ['GET', 'POST', 'PUT', 'DELETE'],
'root' => '/ocm',
],
]
],
];
@@ -10,7 +10,6 @@ return array(
'OCA\\CloudFederationAPI\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
'OCA\\CloudFederationAPI\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
'OCA\\CloudFederationAPI\\Config' => $baseDir . '/../lib/Config.php',
'OCA\\CloudFederationAPI\\Controller\\OCMRequestController' => $baseDir . '/../lib/Controller/OCMRequestController.php',
'OCA\\CloudFederationAPI\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInvite' => $baseDir . '/../lib/Db/FederatedInvite.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInviteMapper' => $baseDir . '/../lib/Db/FederatedInviteMapper.php',
@@ -25,7 +25,6 @@ class ComposerStaticInitCloudFederationAPI
'OCA\\CloudFederationAPI\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
'OCA\\CloudFederationAPI\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
'OCA\\CloudFederationAPI\\Config' => __DIR__ . '/..' . '/../lib/Config.php',
'OCA\\CloudFederationAPI\\Controller\\OCMRequestController' => __DIR__ . '/..' . '/../lib/Controller/OCMRequestController.php',
'OCA\\CloudFederationAPI\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInvite' => __DIR__ . '/..' . '/../lib/Db/FederatedInvite.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInviteMapper' => __DIR__ . '/..' . '/../lib/Db/FederatedInviteMapper.php',
-8
View File
@@ -1,8 +0,0 @@
OC.L10N.register(
"cloud_federation_api",
{
"Cloud Federation API" : "API Federasi Cloud",
"Enable clouds to communicate with each other and exchange data" : "Memungkinkan cloud untuk saling berkomunikasi dan bertukar data",
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Federasi Cloud memungkinkan berbagai instans Nextcloud untuk saling berkomunikasi dan bertukar data."
},
"nplurals=1; plural=0;");
-6
View File
@@ -1,6 +0,0 @@
{ "translations": {
"Cloud Federation API" : "API Federasi Cloud",
"Enable clouds to communicate with each other and exchange data" : "Memungkinkan cloud untuk saling berkomunikasi dan bertukar data",
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Federasi Cloud memungkinkan berbagai instans Nextcloud untuk saling berkomunikasi dan bertukar data."
},"pluralForm" :"nplurals=1; plural=0;"
}
+1 -1
View File
@@ -3,6 +3,6 @@ OC.L10N.register(
{
"Cloud Federation API" : "Cloud Federation API",
"Enable clouds to communicate with each other and exchange data" : "Увімкніть хмари аби спілкуватися один з одним і обмінюватися даними",
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API дозволяє різним примірникам сервера хмари Nextcloud спілкуватися між собою та обмінюватися даними."
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API дозволяє різним примірникам серверу хмари Nextcloud спілкуватися між собою та обмінюватися даними."
},
"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);");
+1 -1
View File
@@ -1,6 +1,6 @@
{ "translations": {
"Cloud Federation API" : "Cloud Federation API",
"Enable clouds to communicate with each other and exchange data" : "Увімкніть хмари аби спілкуватися один з одним і обмінюватися даними",
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API дозволяє різним примірникам сервера хмари Nextcloud спілкуватися між собою та обмінюватися даними."
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API дозволяє різним примірникам серверу хмари Nextcloud спілкуватися між собою та обмінюватися даними."
},"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"
}
@@ -1,87 +0,0 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\CloudFederationAPI\Controller;
use JsonException;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\Response;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IRequest;
use OCP\OCM\Events\OCMEndpointRequestEvent;
use OCP\OCM\Exceptions\OCMArgumentException;
use OCP\OCM\IOCMDiscoveryService;
use OCP\Security\Signature\Exceptions\IncomingRequestException;
use Psr\Log\LoggerInterface;
class OCMRequestController extends Controller {
public function __construct(
string $appName,
IRequest $request,
private readonly IEventDispatcher $eventDispatcher,
private readonly IOCMDiscoveryService $ocmDiscoveryService,
private readonly LoggerInterface $logger,
) {
parent::__construct($appName, $request);
}
/**
* Method will catch any request done to /ocm/[...] and will broadcast an event.
* The first parameter of the remaining subpath (post-/ocm/) is defined as
* capability and should be used by listeners to filter incoming requests.
*
* @see OCMEndpointRequestEvent
* @see OCMEndpointRequestEvent::getArgs
*
* @param string $ocmPath
* @return Response
* @throws OCMArgumentException
*/
#[NoCSRFRequired]
#[PublicPage]
#[BruteForceProtection(action: 'receiveOcmRequest')]
public function manageOCMRequests(string $ocmPath): Response {
if (!mb_check_encoding($ocmPath, 'UTF-8')) {
throw new OCMArgumentException('path is not UTF-8');
}
try {
// if request is signed and well signed, no exceptions are thrown
// if request is not signed and host is known for not supporting signed request, no exceptions are thrown
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming ocm request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
}
// assuming that ocm request contains a json array
$payload = $signedRequest?->getBody() ?? file_get_contents('php://input');
try {
$payload = ($payload) ? json_decode($payload, true, 512, JSON_THROW_ON_ERROR) : null;
} catch (JsonException $e) {
$this->logger->debug('json decode error', ['exception' => $e]);
$payload = null;
}
$event = new OCMEndpointRequestEvent(
$this->request->getMethod(),
preg_replace('@/+@', '/', $ocmPath),
$payload,
$signedRequest?->getOrigin()
);
$this->eventDispatcher->dispatchTyped($event);
return $event->getResponse() ?? new Response(Http::STATUS_NOT_FOUND);
}
}
@@ -7,6 +7,14 @@
namespace OCA\CloudFederationAPI\Controller;
use NCU\Federation\ISignedCloudFederationProvider;
use NCU\Security\Signature\Exceptions\IdentityNotFoundException;
use NCU\Security\Signature\Exceptions\IncomingRequestException;
use NCU\Security\Signature\Exceptions\SignatoryNotFoundException;
use NCU\Security\Signature\Exceptions\SignatureException;
use NCU\Security\Signature\Exceptions\SignatureNotFoundException;
use NCU\Security\Signature\IIncomingSignedRequest;
use NCU\Security\Signature\ISignatureManager;
use OC\OCM\OCMSignatoryManager;
use OCA\CloudFederationAPI\Config;
use OCA\CloudFederationAPI\Db\FederatedInviteMapper;
@@ -31,18 +39,11 @@ use OCP\Federation\Exceptions\ProviderDoesNotExistsException;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudIdManager;
use OCP\Federation\ISignedCloudFederationProvider;
use OCP\IAppConfig;
use OCP\IGroupManager;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\OCM\IOCMDiscoveryService;
use OCP\Security\Signature\Exceptions\IdentityNotFoundException;
use OCP\Security\Signature\Exceptions\IncomingRequestException;
use OCP\Security\Signature\Exceptions\SignatoryNotFoundException;
use OCP\Security\Signature\IIncomingSignedRequest;
use OCP\Security\Signature\ISignatureManager;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Util;
use Psr\Log\LoggerInterface;
@@ -73,8 +74,8 @@ class RequestHandlerController extends Controller {
private readonly IAppConfig $appConfig,
private ICloudFederationFactory $factory,
private ICloudIdManager $cloudIdManager,
private readonly IOCMDiscoveryService $ocmDiscoveryService,
private readonly ISignatureManager $signatureManager,
private readonly OCMSignatoryManager $signatoryManager,
private ITimeFactory $timeFactory,
) {
parent::__construct($appName, $request);
@@ -107,9 +108,9 @@ class RequestHandlerController extends Controller {
public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
if (!$this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_DISABLED, lazy: true)) {
try {
// if request is signed and well signed, no exceptions are thrown
// if request is signed and well signed, no exception are thrown
// if request is not signed and host is known for not supporting signed request, no exception are thrown
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
$signedRequest = $this->getSignedRequest();
$this->confirmSignedOrigin($signedRequest, 'owner', $owner);
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming request exception', ['exception' => $e]);
@@ -359,7 +360,7 @@ class RequestHandlerController extends Controller {
try {
// if request is signed and well signed, no exception are thrown
// if request is not signed and host is known for not supporting signed request, no exception are thrown
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
$signedRequest = $this->getSignedRequest();
$this->confirmNotificationIdentity($signedRequest, $resourceType, $notification);
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming request exception', ['exception' => $e]);
@@ -433,6 +434,37 @@ class RequestHandlerController extends Controller {
}
/**
* returns signed request if available.
* throw an exception:
* - if request is signed, but wrongly signed
* - if request is not signed but instance is configured to only accept signed ocm request
*
* @return IIncomingSignedRequest|null null if remote does not (and never did) support signed request
* @throws IncomingRequestException
*/
private function getSignedRequest(): ?IIncomingSignedRequest {
try {
$signedRequest = $this->signatureManager->getIncomingSignedRequest($this->signatoryManager);
$this->logger->debug('signed request available', ['signedRequest' => $signedRequest]);
return $signedRequest;
} catch (SignatureNotFoundException|SignatoryNotFoundException $e) {
$this->logger->debug('remote does not support signed request', ['exception' => $e]);
// remote does not support signed request.
// currently we still accept unsigned request until lazy appconfig
// core.enforce_signed_ocm_request is set to true (default: false)
if ($this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_ENFORCED, lazy: true)) {
$this->logger->notice('ignored unsigned request', ['exception' => $e]);
throw new IncomingRequestException('Unsigned request');
}
} catch (SignatureException $e) {
$this->logger->warning('wrongly signed request', ['exception' => $e]);
throw new IncomingRequestException('Invalid signature');
}
return null;
}
/**
* confirm that the value related to $key entry from the payload is in format userid@hostname
* and compare hostname with the origin of the signed request.
@@ -9,6 +9,8 @@ declare(strict_types=1);
namespace OCA\CloudFederationApi\Tests;
use NCU\Security\Signature\ISignatureManager;
use OC\OCM\OCMSignatoryManager;
use OCA\CloudFederationAPI\Config;
use OCA\CloudFederationAPI\Controller\RequestHandlerController;
use OCA\CloudFederationAPI\Db\FederatedInvite;
@@ -27,8 +29,6 @@ use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
use OCP\OCM\IOCMDiscoveryService;
use OCP\Security\Signature\ISignatureManager;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use Test\TestCase;
@@ -45,11 +45,10 @@ class RequestHandlerControllerTest extends TestCase {
private FederatedInviteMapper&MockObject $federatedInviteMapper;
private AddressHandler&MockObject $addressHandler;
private IAppConfig&MockObject $appConfig;
private ICloudFederationFactory&MockObject $cloudFederationFactory;
private ICloudIdManager&MockObject $cloudIdManager;
private IOCMDiscoveryService&MockObject $discoveryService;
private ISignatureManager&MockObject $signatureManager;
private OCMSignatoryManager&MockObject $signatoryManager;
private ITimeFactory&MockObject $timeFactory;
private RequestHandlerController $requestHandlerController;
@@ -70,8 +69,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->appConfig = $this->createMock(IAppConfig::class);
$this->cloudFederationFactory = $this->createMock(ICloudFederationFactory::class);
$this->cloudIdManager = $this->createMock(ICloudIdManager::class);
$this->discoveryService = $this->createMock(IOCMDiscoveryService::class);
$this->signatureManager = $this->createMock(ISignatureManager::class);
$this->signatoryManager = $this->createMock(OCMSignatoryManager::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->requestHandlerController = new RequestHandlerController(
@@ -89,8 +88,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->appConfig,
$this->cloudFederationFactory,
$this->cloudIdManager,
$this->discoveryService,
$this->signatureManager,
$this->signatoryManager,
$this->timeFactory,
);
}
+2 -6
View File
@@ -10,7 +10,7 @@
<name>Comments</name>
<summary>Files app plugin to add comments to files</summary>
<description>Files app plugin to add comments to files</description>
<version>1.24.0</version>
<version>1.23.0</version>
<licence>agpl</licence>
<author>Arthur Schiwon</author>
<author>Vincent Petry</author>
@@ -21,7 +21,7 @@
<category>social</category>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<dependencies>
<nextcloud min-version="34" max-version="34"/>
<nextcloud min-version="33" max-version="33"/>
</dependencies>
<activity>
@@ -38,10 +38,6 @@
</providers>
</activity>
<openmetrics>
<exporter>OCA\Comments\OpenMetrics\CommentsCountMetric</exporter>
</openmetrics>
<collaboration>
<plugins>
<plugin type="autocomplete-sort">OCA\Comments\Collaboration\CommentersSorter</plugin>
@@ -22,6 +22,5 @@ return array(
'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => $baseDir . '/../lib/MaxAutoCompleteResultsInitialState.php',
'OCA\\Comments\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php',
'OCA\\Comments\\OpenMetrics\\CommentsCountMetric' => $baseDir . '/../lib/OpenMetrics/CommentsCountMetric.php',
'OCA\\Comments\\Search\\CommentsSearchProvider' => $baseDir . '/../lib/Search/CommentsSearchProvider.php',
);
@@ -37,7 +37,6 @@ class ComposerStaticInitComments
'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => __DIR__ . '/..' . '/../lib/MaxAutoCompleteResultsInitialState.php',
'OCA\\Comments\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php',
'OCA\\Comments\\OpenMetrics\\CommentsCountMetric' => __DIR__ . '/..' . '/../lib/OpenMetrics/CommentsCountMetric.php',
'OCA\\Comments\\Search\\CommentsSearchProvider' => __DIR__ . '/..' . '/../lib/Search/CommentsSearchProvider.php',
);
-1
View File
@@ -17,7 +17,6 @@ OC.L10N.register(
"Delete comment" : "Ezabatu iruzkina",
"Cancel edit" : "Utzi editatzeari",
"New comment" : "Iruzkin berria",
"Write a comment …" : "Idatzi iruzkin bat …",
"Post comment" : "Argitaratu iruzkina",
"@ for mentions, : for emoji, / for smart picker" : "@ aipamenetarako, : emojientzako, / hautatzaile adimentsurako",
"Could not reload comments" : "Ezin izan dira iruzkinak freskatu",
-1
View File
@@ -15,7 +15,6 @@
"Delete comment" : "Ezabatu iruzkina",
"Cancel edit" : "Utzi editatzeari",
"New comment" : "Iruzkin berria",
"Write a comment …" : "Idatzi iruzkin bat …",
"Post comment" : "Argitaratu iruzkina",
"@ for mentions, : for emoji, / for smart picker" : "@ aipamenetarako, : emojientzako, / hautatzaile adimentsurako",
"Could not reload comments" : "Ezin izan dira iruzkinak freskatu",
+3 -12
View File
@@ -5,33 +5,24 @@ OC.L10N.register(
"You commented" : "Anda berkomentar",
"{author} commented" : "{author} berkomentar",
"You commented on %1$s" : "Anda berkomentar pada %1$s",
"You commented on {file}" : "Anda berkomentar pada {file}",
"You commented on {file}" : "Anda berkomentar pada {file} ",
"%1$s commented on %2$s" : "%1$s dikomentari pada %2$s",
"{author} commented on {file}" : "{author} berkomentar pada {file}",
"<strong>Comments</strong> for files" : "<strong>komentar</strong> pada file",
"Files" : "File",
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Anda disebutkan pada \"{file}\", dalam sebuah komentar oleh akun yang sejak itu telah dihapus",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\"",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\" ",
"Files app plugin to add comments to files" : "Plugin aplikasi file untuk menambah komentar pada file",
"Edit comment" : "Sunting komentar",
"Delete comment" : "Hapus komentar",
"Cancel edit" : "Batal sunting",
"New comment" : "Komentar baru",
"Write a comment …" : "Tulis komentar …",
"Post comment" : "Posting komentar",
"@ for mentions, : for emoji, / for smart picker" : "@ untuk penyebutan, : untuk emoji, / untuk pemilih cerdas",
"Could not reload comments" : "Tidak dapat memuat ulang komentar",
"Failed to mark comments as read" : "Gagal menandai komentar sebagai sudah dibaca",
"Unable to load the comments list" : "Tidak dapat memuat daftar komentar",
"No comments yet, start the conversation!" : "Belum ada yang berkomentar, mulailah perbincangan!",
"No more messages" : "Tidak ada pesan lagi",
"Retry" : "Ulangi",
"_1 new comment_::_{unread} new comments_" : ["{unread} komentar baru"],
"Comment" : "Komentar",
"An error occurred while trying to edit the comment" : "Terjadi kesalahan ketika mencoba menyunting komentar",
"Comment deleted" : "Komentar dihapus",
"An error occurred while trying to delete the comment" : "Terjadi kesalahan ketika mencoba untuk menghapus komentar",
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar",
"Write a comment …" : "Tulis komentar …"
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar"
},
"nplurals=1; plural=0;");
+3 -12
View File
@@ -3,33 +3,24 @@
"You commented" : "Anda berkomentar",
"{author} commented" : "{author} berkomentar",
"You commented on %1$s" : "Anda berkomentar pada %1$s",
"You commented on {file}" : "Anda berkomentar pada {file}",
"You commented on {file}" : "Anda berkomentar pada {file} ",
"%1$s commented on %2$s" : "%1$s dikomentari pada %2$s",
"{author} commented on {file}" : "{author} berkomentar pada {file}",
"<strong>Comments</strong> for files" : "<strong>komentar</strong> pada file",
"Files" : "File",
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Anda disebutkan pada \"{file}\", dalam sebuah komentar oleh akun yang sejak itu telah dihapus",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\"",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\" ",
"Files app plugin to add comments to files" : "Plugin aplikasi file untuk menambah komentar pada file",
"Edit comment" : "Sunting komentar",
"Delete comment" : "Hapus komentar",
"Cancel edit" : "Batal sunting",
"New comment" : "Komentar baru",
"Write a comment …" : "Tulis komentar …",
"Post comment" : "Posting komentar",
"@ for mentions, : for emoji, / for smart picker" : "@ untuk penyebutan, : untuk emoji, / untuk pemilih cerdas",
"Could not reload comments" : "Tidak dapat memuat ulang komentar",
"Failed to mark comments as read" : "Gagal menandai komentar sebagai sudah dibaca",
"Unable to load the comments list" : "Tidak dapat memuat daftar komentar",
"No comments yet, start the conversation!" : "Belum ada yang berkomentar, mulailah perbincangan!",
"No more messages" : "Tidak ada pesan lagi",
"Retry" : "Ulangi",
"_1 new comment_::_{unread} new comments_" : ["{unread} komentar baru"],
"Comment" : "Komentar",
"An error occurred while trying to edit the comment" : "Terjadi kesalahan ketika mencoba menyunting komentar",
"Comment deleted" : "Komentar dihapus",
"An error occurred while trying to delete the comment" : "Terjadi kesalahan ketika mencoba untuk menghapus komentar",
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar",
"Write a comment …" : "Tulis komentar …"
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar"
},"pluralForm" :"nplurals=1; plural=0;"
}
-1
View File
@@ -17,7 +17,6 @@ OC.L10N.register(
"Delete comment" : "Reactie verwijderen",
"Cancel edit" : "Bewerking annuleren",
"New comment" : "Nieuwe reactie",
"Write a comment …" : "Schrijf een commentaar …",
"Post comment" : "Reactie plaatsen",
"@ for mentions, : for emoji, / for smart picker" : "@ voor vermeldingen, : voor emoji, / voor Smart Picker",
"Could not reload comments" : "Kon reactie niet opnieuw laden",
-1
View File
@@ -15,7 +15,6 @@
"Delete comment" : "Reactie verwijderen",
"Cancel edit" : "Bewerking annuleren",
"New comment" : "Nieuwe reactie",
"Write a comment …" : "Schrijf een commentaar …",
"Post comment" : "Reactie plaatsen",
"@ for mentions, : for emoji, / for smart picker" : "@ voor vermeldingen, : voor emoji, / voor Smart Picker",
"Could not reload comments" : "Kon reactie niet opnieuw laden",
@@ -1,52 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Comments\OpenMetrics;
use Generator;
use OCP\IDBConnection;
use OCP\OpenMetrics\IMetricFamily;
use OCP\OpenMetrics\Metric;
use OCP\OpenMetrics\MetricType;
use Override;
class CommentsCountMetric implements IMetricFamily {
public function __construct(
private IDBConnection $connection,
) {
}
#[Override]
public function name(): string {
return 'comments';
}
#[Override]
public function type(): MetricType {
return MetricType::gauge;
}
#[Override]
public function unit(): string {
return 'comments';
}
#[Override]
public function help(): string {
return 'Number of comments';
}
#[Override]
public function metrics(): Generator {
$qb = $this->connection->getQueryBuilder();
$result = $qb->select($qb->func()->count())
->from('comments')
->where($qb->expr()->eq('verb', $qb->expr()->literal('comment')))
->executeQuery();
yield new Metric($result->fetchOne(), [], time());
}
}
@@ -180,12 +180,14 @@ describe('Inline unread comments action enabled tests', () => {
describe('Inline unread comments action execute tests', () => {
test('Action opens sidebar', async () => {
const openMock = vi.fn()
const setActiveTabMock = vi.fn()
window.OCA = {
Files: {
// @ts-expect-error Mocking for testing
_sidebar: () => ({
Sidebar: {
open: openMock,
}),
setActiveTab: setActiveTabMock,
},
},
}
@@ -209,19 +211,22 @@ describe('Inline unread comments action execute tests', () => {
})
expect(result).toBe(null)
expect(openMock).toBeCalledWith(file, 'comments')
expect(setActiveTabMock).toBeCalledWith('comments')
expect(openMock).toBeCalledWith('/foobar.txt')
})
test('Action handles sidebar open failure', async () => {
const openMock = vi.fn(() => {
throw new Error('Mock error')
})
const setActiveTabMock = vi.fn()
window.OCA = {
Files: {
// @ts-expect-error Mocking for testing
_sidebar: () => ({
Sidebar: {
open: openMock,
}),
setActiveTab: setActiveTabMock,
},
},
}
vi.spyOn(logger, 'error').mockImplementation(() => vi.fn())
@@ -246,7 +251,8 @@ describe('Inline unread comments action execute tests', () => {
})
expect(result).toBe(false)
expect(openMock).toBeCalledWith(file, 'comments')
expect(setActiveTabMock).toBeCalledWith('comments')
expect(openMock).toBeCalledWith('/foobar.txt')
expect(logger.error).toBeCalledTimes(1)
})
})
@@ -1,10 +1,9 @@
/*!
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import CommentProcessingSvg from '@mdi/svg/svg/comment-processing.svg?raw'
import { FileAction, getSidebar } from '@nextcloud/files'
import { FileAction } from '@nextcloud/files'
import { n, t } from '@nextcloud/l10n'
import logger from '../logger.js'
@@ -35,8 +34,8 @@ export const action = new FileAction({
}
try {
const sidebar = getSidebar()
sidebar.open(nodes[0], 'comments')
window.OCA.Files.Sidebar.setActiveTab('comments')
await window.OCA.Files.Sidebar.open(nodes[0].path)
return null
} catch (error) {
logger.error('Error while opening sidebar', { error })
+8 -16
View File
@@ -1,10 +1,8 @@
/*!
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { INode } from '@nextcloud/files'
import moment from '@nextcloud/moment'
import { createPinia, PiniaVuePlugin } from 'pinia'
import Vue, { type ComponentPublicInstance } from 'vue'
@@ -21,7 +19,7 @@ let ActivityTabPluginInstance
*/
export function registerCommentsPlugins() {
window.OCA.Activity.registerSidebarAction({
mount: async (el: HTMLElement, { node, reload }: { node: INode, reload: () => void }) => {
mount: async (el, { fileInfo, reload }) => {
const pinia = createPinia()
if (!ActivityTabPluginView) {
@@ -34,10 +32,10 @@ export function registerCommentsPlugins() {
pinia,
propsData: {
reloadCallback: reload,
resourceId: node.fileid,
resourceId: fileInfo.id,
},
})
logger.info('Comments plugin mounted in Activity sidebar action', { node })
logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo })
},
unmount: () => {
// destroy previous instance if available
@@ -47,15 +45,9 @@ export function registerCommentsPlugins() {
},
})
window.OCA.Activity.registerSidebarEntries(async ({ node, limit, offset }: { node: INode, limit?: number, offset?: number }) => {
const { data: comments } = await getComments(
{ resourceType: 'files', resourceId: node.fileid },
{
limit,
offset: offset ?? 0,
},
)
logger.debug('Loaded comments', { node, comments })
window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {
const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset })
logger.debug('Loaded comments', { fileInfo, comments })
const { default: CommentView } = await import('./views/ActivityCommentEntry.vue')
// @ts-expect-error Types are broken for Vue2
const CommentsViewObject = Vue.extend(CommentView)
@@ -70,7 +62,7 @@ export function registerCommentsPlugins() {
el: element,
propsData: {
comment,
resourceId: node.fileid,
resourceId: fileInfo.id,
reloadCallback: reload,
},
})
+59
View File
@@ -0,0 +1,59 @@
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'
import { getCSPNonce } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
import { registerCommentsPlugins } from './comments-activity-tab.ts'
// @ts-expect-error __webpack_nonce__ is injected by webpack
__webpack_nonce__ = getCSPNonce()
if (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {
// Do not mount own tab but mount into activity
window.addEventListener('DOMContentLoaded', function() {
registerCommentsPlugins()
})
} else {
// Init Comments tab component
let TabInstance = null
const commentTab = new OCA.Files.Sidebar.Tab({
id: 'comments',
name: t('comments', 'Comments'),
iconSvg: MessageReplyText,
async mount(el, fileInfo, context) {
if (TabInstance) {
TabInstance.$destroy()
}
TabInstance = new OCA.Comments.View('files', {
// Better integration with vue parent component
parent: context,
propsData: {
resourceId: fileInfo.id,
},
})
// Only mount after we have all the info we need
await TabInstance.update(fileInfo.id)
TabInstance.$mount(el)
},
update(fileInfo) {
TabInstance.update(fileInfo.id)
},
destroy() {
TabInstance.$destroy()
TabInstance = null
},
scrollBottomReached() {
TabInstance.onScrollBottomReached()
},
})
window.addEventListener('DOMContentLoaded', function() {
if (OCA.Files && OCA.Files.Sidebar) {
OCA.Files.Sidebar.registerTab(commentTab)
}
})
}
-48
View File
@@ -1,48 +0,0 @@
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'
import { getCSPNonce } from '@nextcloud/auth'
import { registerSidebarTab } from '@nextcloud/files'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import wrap from '@vue/web-component-wrapper'
import { createPinia, PiniaVuePlugin } from 'pinia'
import Vue from 'vue'
import { registerCommentsPlugins } from './comments-activity-tab.ts'
__webpack_nonce__ = getCSPNonce()
const tagName = 'comments_files-sidebar-tab'
if (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {
// Do not mount own tab but mount into activity
window.addEventListener('DOMContentLoaded', function() {
registerCommentsPlugins()
})
} else {
registerSidebarTab({
id: 'comments',
displayName: t('comments', 'Comments'),
iconSvgInline: MessageReplyText,
order: 50,
tagName,
async onInit() {
const { default: FilesSidebarTab } = await import('./views/FilesSidebarTab.vue')
Vue.use(PiniaVuePlugin)
Vue.mixin({ pinia: createPinia() })
const webComponent = wrap(Vue, FilesSidebarTab)
// In Vue 2, wrap doesn't support disabling shadow. Disable with a hack
Object.defineProperty(webComponent.prototype, 'attachShadow', {
value() { return this },
})
Object.defineProperty(webComponent.prototype, 'shadowRoot', {
get() { return this },
})
window.customElements.define(tagName, webComponent)
},
})
}
+3 -4
View File
@@ -1,9 +1,8 @@
/*!
import { getCurrentUser } from '@nextcloud/auth'
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCurrentUser } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
import { loadState } from '@nextcloud/initial-state'
import { generateOcsUrl } from '@nextcloud/router'
@@ -33,7 +32,7 @@ export default defineComponent({
},
methods: {
/**
* Autocomplete `@mentions`
* Autocomplete @mentions
*
* @param search the query
* @param callback the callback to process the results with
@@ -1,32 +0,0 @@
<!--
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<script setup lang="ts">
import type { IFolder, INode, IView } from '@nextcloud/files'
import { computed } from 'vue'
import Comments from './Comments.vue'
const props = defineProps<{
node?: INode
// eslint-disable-next-line vue/no-unused-properties -- Required on the web component interface
active?: boolean
// eslint-disable-next-line vue/no-unused-properties -- Required on the web component interface
folder?: IFolder
// eslint-disable-next-line vue/no-unused-properties -- Required on the web component interface
view?: IView
}>()
const resourceId = computed(() => props.node?.fileid)
</script>
<template>
<Comments
v-if="resourceId !== undefined"
:key="resourceId"
:resource-id="resourceId"
resource-type="files" />
</template>
@@ -26,7 +26,7 @@ use Test\TestCase;
*
* @package OCA\Comments\Tests\Unit\AppInfo
*/
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
#[\PHPUnit\Framework\Attributes\Group('DB')]
class ApplicationTest extends TestCase {
protected function setUp(): void {
parent::setUp();
@@ -27,7 +27,7 @@ class CommentersSorterTest extends TestCase {
/**
* @param $data
*/
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'sortDataProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('sortDataProvider')]
public function testSort($data): void {
$commentMocks = [];
foreach ($data['actors'] as $actorType => $actors) {
@@ -61,7 +61,7 @@ class EventHandlerTest extends TestCase {
];
}
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'handledProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('handledProvider')]
public function testHandled(string $eventType): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
@@ -51,7 +51,7 @@ class ListenerTest extends TestCase {
* @param string $eventType
* @param string $notificationMethod
*/
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'eventProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('eventProvider')]
public function testEvaluate(string $eventType, $notificationMethod): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
@@ -111,7 +111,7 @@ class ListenerTest extends TestCase {
$this->listener->evaluate($event);
}
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'eventProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('eventProvider')]
public function testEvaluateNoMentions(string $eventType): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
+2 -2
View File
@@ -9,7 +9,7 @@
<name>Contacts Interaction</name>
<summary>Manages interaction between accounts and contacts</summary>
<description>Collect data about accounts and contacts interactions and provide an address book for the data</description>
<version>1.15.0</version>
<version>1.14.1</version>
<licence>agpl</licence>
<author>Christoph Wurst</author>
<author homepage="https://github.com/nextcloud/groupware">Nextcloud Groupware Team</author>
@@ -21,7 +21,7 @@
<category>social</category>
<bugs>https://github.com/nextcloud/server/issues</bugs>
<dependencies>
<nextcloud min-version="34" max-version="34"/>
<nextcloud min-version="33" max-version="33"/>
</dependencies>
<background-jobs>
<job>OCA\ContactsInteraction\BackgroundJob\CleanupJob</job>
-9
View File
@@ -1,9 +0,0 @@
OC.L10N.register(
"contactsinteraction",
{
"Recently contacted" : "Baru-baru ini dihubungi",
"Contacts Interaction" : "Interaksi Kontak",
"Manages interaction between accounts and contacts" : "Mengelola interaksi antara akun dan kontak",
"Collect data about accounts and contacts interactions and provide an address book for the data" : "Mengumpulkan data tentang interaksi akun dan kontak serta menyediakan buku alamat untuk data tersebut"
},
"nplurals=1; plural=0;");
-7
View File
@@ -1,7 +0,0 @@
{ "translations": {
"Recently contacted" : "Baru-baru ini dihubungi",
"Contacts Interaction" : "Interaksi Kontak",
"Manages interaction between accounts and contacts" : "Mengelola interaksi antara akun dan kontak",
"Collect data about accounts and contacts interactions and provide an address book for the data" : "Mengumpulkan data tentang interaksi akun dan kontak serta menyediakan buku alamat untuk data tersebut"
},"pluralForm" :"nplurals=1; plural=0;"
}
@@ -17,7 +17,7 @@ use Sabre\VObject\Component\VCard;
use Sabre\VObject\UUIDUtil;
use Test\TestCase;
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
#[\PHPUnit\Framework\Attributes\Group('DB')]
class RecentContactMapperTest extends TestCase {
private RecentContactMapper $recentContactMapper;
private ITimeFactory $time;

Some files were not shown because too many files have changed in this diff Show More