Skip to content

Commit

Permalink
Merge branch 'master' into refactor_lib_private_systemtag
Browse files Browse the repository at this point in the history
Signed-off-by: Faraz Samapoor <[email protected]>
  • Loading branch information
fsamapoor authored Aug 3, 2023
2 parents ad7d431 + 9a7e2b1 commit dac222c
Show file tree
Hide file tree
Showing 2,263 changed files with 57,286 additions and 49,522 deletions.
4 changes: 4 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
kind: pipeline
name: checkers

Expand Down Expand Up @@ -1995,3 +1996,6 @@ trigger:
event:
- pull_request
- push
---
kind: signature
hmac: a5c0c1e40125b53ff88c617699710f3dc9685d80f06fd8f560b2662ccb1c3497
13 changes: 5 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@ module.exports = {
__webpack_nonce__: true,
_: true,
$: true,
moment: true,
escapeHTML: true,
oc_userconfig: true,
dayNames: true,
escapeHTML: true,
firstDay: true,
'cypress/globals': true,
},
parserOptions: {
parser: '@typescript-eslint/parser',
moment: true,
oc_userconfig: true,
sinon: true,
},
plugins: [
'cypress',
],
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
'plugin:cypress/recommended',
],
rules: {
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

# Two-Factor Authentication
# https://github.com/nextcloud/wg-two-factor-authentication#members
/apps/twofactor_backupcodes @ChristophWurst @miaulalala @nickvergessen
*/TwoFactorAuth/* @ChristophWurst @miaulalala @nickvergessen
/core/templates/twofactor* @ChristophWurst @miaulalala @nickvergessen
**/TwoFactorAuth @ChristophWurst @miaulalala @nickvergessen @st3iny
/apps/twofactor_backupcodes @ChristophWurst @miaulalala @nickvergessen @st3iny
/core/templates/twofactor* @ChristophWurst @miaulalala @nickvergessen @st3iny

# Personal interest
*/Activity/* @nickvergessen
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/command-pull-3rdparty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@ jobs:

steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"
reactions: "+1"

- name: Checkout the latest code
- name: Init branch
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
id: comment-branch

- name: Checkout ${{ steps.comment-branch.outputs.head_ref }}
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}
ref: ${{ steps.comment-branch.outputs.head_ref }}

- name: Setup git
run: |
Expand All @@ -46,10 +51,10 @@ jobs:
git push
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.1
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"
reactions: "-1"
46 changes: 31 additions & 15 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
pull_request:
push:
branches:
- main
- master
- stable*

env:
APP_NAME: server
BRANCH: ${{ github.base_ref }}
TESTING: true
# Adjust APP_NAME if your repository name is different
APP_NAME: ${{ github.event.repository.name }}
# Server requires head_ref instead of base_ref, as we want to test the PR branch
BRANCH: ${{ github.head_ref || github.ref_name }}

jobs:
init:
Expand All @@ -23,8 +25,18 @@ jobs:
- name: Checkout app
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Check composer.json
id: check_composer
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: "composer.json"

- name: Install composer dependencies
if: steps.check_composer.outputs.files_exists == 'true'
run: composer install --no-dev

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.1
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
id: versions
with:
fallbackNode: "^14"
Expand All @@ -33,19 +45,18 @@ jobs:
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
cache: 'npm'
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies & build app
- name: Install node dependencies & build app
run: |
npm ci
TESTING=true npm run build --if-present
- name: Save context
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
with:
key: cypress-context-${{ github.run_id }}
path: ./
Expand All @@ -57,14 +68,15 @@ jobs:
strategy:
fail-fast: false
matrix:
# run multiple copies of the current job in parallel
# Run multiple copies of the current job in parallel
# Please increase the number or runners as your tests suite grows
containers: ["component", 1, 2]

name: runner ${{ matrix.containers }}

steps:
- name: Restore context
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
with:
fail-on-cache-miss: true
key: cypress-context-${{ github.run_id }}
Expand All @@ -73,15 +85,13 @@ jobs:
- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
cache: 'npm'
node-version: ${{ needs.init.outputs.nodeVersion }}

- name: Set up npm ${{ needs.init.outputs.npmVersion }}
run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}"


- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
uses: cypress-io/github-action@db1693016f23ccf9043f4b2428f9b04e5d502a73 # v5.8.1
uses: cypress-io/github-action@d69252d52b9a31bad4f418f05ba2bc83687a02eb # v5.8.3
with:
record: true
parallel: true
Expand All @@ -90,21 +100,27 @@ jobs:
group: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }}
# cypress env
ci-build-id: ${{ github.sha }}-${{ github.run_number }}
tag: ${{ github.event_name }}t
tag: ${{ github.event_name }}
env:
# Needs to be prefixed with CYPRESS_
CYPRESS_BRANCH: ${{ env.BRANCH }}
CYPRESS_GH: true
# https://github.com/cypress-io/github-action/issues/124
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
# Needed for some specific code workarounds
TESTING: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

- name: Upload snapshots
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always()
with:
name: snapshots_${{ matrix.containers }}
path: cypress/snapshots

- name: Extract NC logs
if: failure() && matrix.containers != 'component'
run: docker logs nextcloud-cypress-tests-server > nextcloud.log
run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log

- name: Upload NC logs
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-32bits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
uses: shivammathur/setup-php@9c77701ae57b0c47f6732beebfbdec76e4e5c90a #debian bookworm fix
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip, apcu
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pr-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Ask for feedback on PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
pr-feedback:
runs-on: ubuntu-22.04
steps:
- name: The get-github-handles-from-website action
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
id: scrape
with:
website: 'https://nextcloud.com/team/'
- uses: marcelklehr/pr-feedback-action@601109aa729eb4c8d6d0ece7567b9d4901db4aef
with:
feedback-message: |
Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
days-before-feedback: 14
start-date: "2023-07-10"
exempt-authors: "${{ steps.scrape.outputs.users }}"
exempt-bots: true
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 1420 files
1 change: 1 addition & 0 deletions __mocks__/@nextcloud/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/
export default {
get: async () => ({ status: 200, data: {} }),
delete: async () => ({ status: 200, data: {} }),
post: async () => ({ status: 200, data: {} }),
}
30 changes: 30 additions & 0 deletions __mocks__/@nextcloud/dialogs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* @copyright Copyright (c) 2023 John Molakvoæ <[email protected]>
*
* @author John Molakvoæ <[email protected]>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import { jest } from '@jest/globals'

export const showMessage = jest.fn()
export const showSuccess = jest.fn()
export const showWarning = jest.fn()
export const showInfo = jest.fn()
export const showError = jest.fn()
export const showUndo = jest.fn()
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* @copyright Copyright (c) 2016 John Molakvoæ <[email protected]>
* @copyright Copyright (c) 2023 John Molakvoæ <[email protected]>
*
* @author John Molakvoæ <[email protected]>
* @author Julius Härtl <[email protected]>
*
* @license AGPL-3.0-or-later
*
Expand All @@ -21,5 +20,6 @@
*
*/

import '../js/app.js'
import '../js/sharedfilelist.js'
export const loadState = function(app: string, key: string, fallback?: any) {
return fallback
}
2 changes: 1 addition & 1 deletion __mocks__/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
export default 'SvgMock'
export default '<svg>SvgMock</svg>'
10 changes: 7 additions & 3 deletions dist/core-maintenance.js.LICENSE.txt → __mocks__/webdav.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/**
* @copyright 2019 Christoph Wurst <[email protected]>
* @copyright Copyright (c) 2023 John Molakvoæ <[email protected]>
*
* @author Christoph Wurst <[email protected]>
* @author John Molakvoæ <[email protected]>
* @author Roeland Jago Douma <[email protected]>
*
* @license AGPL-3.0-or-later
*
Expand All @@ -21,3 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
export const createClient = () => {}
export const getPatcher = () => {
return {
patch: () => {}
}
}
6 changes: 6 additions & 0 deletions __tests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"verbatimModuleSyntax": false
}
}
Loading

0 comments on commit dac222c

Please sign in to comment.