Skip to content

Commit eb262c2

Browse files
authored
Merge branch 'main' into fix/readme-example
2 parents 39ffea0 + f1c7276 commit eb262c2

99 files changed

Lines changed: 9761 additions & 8133 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,58 @@
1-
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
1+
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
22
# SPDX-License-Identifier: CC0-1.0
33

44
version: 2
55
updates:
6-
- package-ecosystem: npm
7-
directory: "/"
8-
schedule:
9-
interval: weekly
10-
day: saturday
11-
time: "03:00"
12-
timezone: Europe/Paris
13-
labels:
14-
- "type: dependencies"
15-
reviewers:
16-
- "nextcloud-libraries/files"
17-
open-pull-requests-limit: 10
18-
versioning-strategy: increase
6+
- package-ecosystem: github-actions
7+
directory: "/"
8+
schedule:
9+
interval: weekly
10+
day: saturday
11+
time: "03:00"
12+
timezone: Europe/Paris
13+
open-pull-requests-limit: 10
14+
labels:
15+
- 3. to review
16+
- "type: dependencies"
17+
18+
- package-ecosystem: npm
19+
target-branch: main
20+
directory: "/"
21+
schedule:
22+
interval: weekly
23+
day: saturday
24+
time: "03:00"
25+
timezone: Europe/Paris
26+
open-pull-requests-limit: 10
27+
versioning-strategy: "increase"
28+
labels:
29+
- "type: dependencies"
30+
- 3. to review
31+
groups:
32+
vitest:
33+
patterns:
34+
- "vitest"
35+
- "@vitest/*"
36+
37+
- package-ecosystem: npm
38+
target-branch: stable3
39+
directory: "/"
40+
schedule:
41+
interval: weekly
42+
day: saturday
43+
time: "03:00"
44+
timezone: Europe/Paris
45+
open-pull-requests-limit: 10
46+
versioning-strategy: "increase"
47+
labels:
48+
- 3. to review
49+
- "type: dependencies"
50+
ignore:
51+
- dependency-name: "*"
52+
# ignore all major updates
53+
update-types: ["version-update:semver-major"]
54+
groups:
55+
vitest:
56+
patterns:
57+
- "vitest"
58+
- "@vitest/*"

.github/workflows/block-unconventional-commits.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
@@ -27,10 +27,10 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131
with:
3232
persist-credentials: false
3333

34-
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
34+
- uses: webiny/action-conventional-commits@faccb24fc2550dd15c0390d944379d2d8ed9690e # v1.3.1
3535
with:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dependabot-approve-merge.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
6-
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
6+
# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
77
# SPDX-License-Identifier: MIT
88

9-
name: Dependabot
9+
name: Auto approve Dependabot PRs
1010

1111
on:
12-
pull_request:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1313
branches:
1414
- main
1515
- master
@@ -29,6 +29,8 @@ jobs:
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs
3131
pull-requests: write
32+
# for alexwilson/enable-github-automerge-action to approve PRs
33+
contents: write
3234

3335
steps:
3436
- name: Disabled on forks
@@ -37,13 +39,20 @@ jobs:
3739
echo 'Can not approve PRs from forks'
3840
exit 1
3941
42+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+
id: branchname
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
4047
# GitHub actions bot approve
41-
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
48+
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4250
with:
4351
github-token: ${{ secrets.GITHUB_TOKEN }}
4452

45-
# Nextcloud bot approve and merge request
46-
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2
53+
# Enable GitHub auto merge
54+
- name: Auto merge
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4757
with:
48-
target: minor
49-
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
58+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/documentation.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -14,40 +14,30 @@ on:
1414
types: [published]
1515

1616
permissions:
17-
contents: read
17+
contents: write
1818

1919
jobs:
2020
build-and-deploy:
2121
runs-on: ubuntu-latest
2222

2323
name: Build and deploy
2424
steps:
25-
- name: Check actor permission level
26-
# Only allow admin to deploy on release
27-
if: github.event.release
28-
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
29-
with:
30-
require: write
31-
3225
- name: Checkout
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3427
with:
3528
persist-credentials: false
3629

37-
- name: Read package.json node and npm engines version
38-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
30+
- name: Read package.json
31+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
3932
id: versions
40-
with:
41-
fallbackNode: '^20'
42-
fallbackNpm: '^10'
4333

44-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
45-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
34+
- name: Set up node
35+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4636
with:
47-
node-version: ${{ steps.versions.outputs.nodeVersion }}
37+
node-version: ${{ steps.versions.outputs.node-version }}
4838

49-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
50-
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
39+
- name: Set up npm
40+
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
5141

5242
- name: Install dependencies & build
5343
env:

.github/workflows/fixup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors

.github/workflows/lint-eslint.yml

Lines changed: 10 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
@@ -18,62 +18,28 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
changes:
22-
runs-on: ubuntu-latest
23-
permissions:
24-
contents: read
25-
pull-requests: read
26-
27-
outputs:
28-
src: ${{ steps.changes.outputs.src}}
29-
30-
steps:
31-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
32-
id: changes
33-
continue-on-error: true
34-
with:
35-
filters: |
36-
src:
37-
- '.github/workflows/**'
38-
- 'src/**'
39-
- 'appinfo/info.xml'
40-
- 'package.json'
41-
- 'package-lock.json'
42-
- 'tsconfig.json'
43-
- '.eslintrc.*'
44-
- '.eslintignore'
45-
- '**.js'
46-
- '**.ts'
47-
- '**.vue'
48-
4921
lint:
5022
runs-on: ubuntu-latest
5123

52-
needs: changes
53-
if: needs.changes.outputs.src != 'false'
54-
55-
name: NPM lint
24+
name: eslint
5625

5726
steps:
5827
- name: Checkout
59-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6029
with:
6130
persist-credentials: false
6231

63-
- name: Read package.json node and npm engines version
64-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
32+
- name: Read package.json
33+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
6534
id: versions
66-
with:
67-
fallbackNode: '^20'
68-
fallbackNpm: '^10'
6935

70-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
71-
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
36+
- name: Set up node
37+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
7238
with:
73-
node-version: ${{ steps.versions.outputs.nodeVersion }}
39+
node-version: ${{ steps.versions.outputs.node-version }}
7440

75-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
76-
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
41+
- name: Set up npm
42+
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
7743

7844
- name: Install dependencies
7945
env:
@@ -83,18 +49,3 @@ jobs:
8349

8450
- name: Lint
8551
run: npm run lint
86-
87-
summary:
88-
permissions:
89-
contents: none
90-
runs-on: ubuntu-latest
91-
needs: [changes, lint]
92-
93-
if: always()
94-
95-
# This is the summary, we just avoid to rename it so that branch protection rules still match
96-
name: eslint
97-
98-
steps:
99-
- name: Summary status
100-
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud-libraries/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Type checking
10+
11+
on:
12+
pull_request:
13+
push:
14+
branches:
15+
- main
16+
- master
17+
- stable*
18+
19+
permissions:
20+
contents: read
21+
22+
concurrency:
23+
group: lint-typescript-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
test:
28+
runs-on: ubuntu-latest
29+
name: Lint Typescript
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
with:
35+
persist-credentials: false
36+
37+
- name: Read package.json
38+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
39+
id: versions
40+
41+
- name: Set up node
42+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
43+
with:
44+
node-version: ${{ steps.versions.outputs.node-version }}
45+
46+
- name: Set up npm
47+
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
48+
49+
- name: Install dependencies
50+
env:
51+
CYPRESS_INSTALL_BINARY: 0
52+
run: npm ci
53+
54+
- name: Check types
55+
run: |
56+
npm run --if-present check-types
57+
npm run --if-present ts:check

0 commit comments

Comments
 (0)