Skip to content

Commit 8e2dee6

Browse files
committed
Add newFileMenu and refactor library
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 parent fa74d22 commit 8e2dee6

24 files changed

+13118
-7354
lines changed

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
extends: [
3+
'@nextcloud',
4+
],
5+
}

.github/dependabot.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
16
version: 2
27
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: weekly
7-
day: saturday
8-
time: "03:00"
9-
timezone: Europe/Paris
10-
open-pull-requests-limit: 10
8+
- package-ecosystem: npm
9+
directory: "/"
10+
schedule:
11+
interval: daily
12+
timezone: Europe/Paris
13+
open-pull-requests-limit: 10
14+
labels:
15+
- 3. to review
16+
- dependencies
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
name: Rebase command
7+
8+
on:
9+
issue_comment:
10+
types: created
11+
12+
jobs:
13+
rebase:
14+
runs-on: ubuntu-latest
15+
16+
# On pull requests and if the comment starts with `/rebase`
17+
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
18+
19+
steps:
20+
- name: Add reaction on start
21+
uses: peter-evans/create-or-update-comment@v2
22+
with:
23+
token: ${{ secrets.COMMAND_BOT_PAT }}
24+
repository: ${{ github.event.repository.full_name }}
25+
comment-id: ${{ github.event.comment.id }}
26+
reaction-type: "+1"
27+
28+
- name: Checkout the latest code
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
32+
token: ${{ secrets.COMMAND_BOT_PAT }}
33+
34+
- name: Automatic Rebase
35+
uses: cirrus-actions/rebase@1.6
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
38+
39+
- name: Add reaction on failure
40+
uses: peter-evans/create-or-update-comment@v2
41+
if: failure()
42+
with:
43+
token: ${{ secrets.COMMAND_BOT_PAT }}
44+
repository: ${{ github.event.repository.full_name }}
45+
comment-id: ${{ github.event.comment.id }}
46+
reaction-type: "-1"

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ name: Dependabot
88
on:
99
pull_request_target:
1010
branches:
11+
- main
1112
- master
1213
- stable*
1314

1415
jobs:
1516
auto-approve-merge:
1617
if: github.actor == 'dependabot[bot]'
1718
runs-on: ubuntu-latest
19+
permissions:
20+
pull-requests: write
1821

1922
steps:
2023
# Github actions bot approve
2124
- uses: hmarr/auto-approve-action@v2
2225
with:
23-
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
github-token: ${{ secrets.COMMAND_BOT_PAT }}
2427

2528
# Nextcloud bot approve and merge request
2629
- uses: ahmadnassri/action-dependabot-auto-merge@v2

.github/workflows/fixup.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
name: Pull request checks
7+
8+
on: pull_request
9+
10+
jobs:
11+
commit-message-check:
12+
name: Block fixup and squash commits
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Run check
18+
uses: xt0rted/block-autosquash-commits-action@v2
19+
with:
20+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/node-test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Node
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- stable*
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
checks: write
16+
pull-requests: write
17+
strategy:
18+
matrix:
19+
node-version: [ 16, 18 ]
20+
include:
21+
- node-version: 14
22+
coverage: coverage
23+
24+
name: test
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Set up node ${{ matrix.node-version }}
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Test
38+
run: npm run test --if-present
39+
40+
- name: Test and process coverage
41+
if: matrix.coverage
42+
run: npm run test:coverage
43+
44+
- name: Collect coverage
45+
uses: codecov/codecov-action@v2
46+
with:
47+
files: ./coverage/lcov.info
48+
49+
50+
summary:
51+
runs-on: ubuntu-latest
52+
needs: test
53+
if: always()
54+
55+
name: test-summary
56+
steps:
57+
- name: Summary status
58+
run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi

.github/workflows/node.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
name: Node
7+
8+
on:
9+
pull_request:
10+
push:
11+
branches:
12+
- main
13+
- master
14+
- stable*
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
name: node
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Read package.json node and npm engines version
26+
uses: skjnldsv/read-package-engines-version-actions@v1.2
27+
id: versions
28+
with:
29+
fallbackNode: '^12'
30+
fallbackNpm: '^6'
31+
32+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: ${{ steps.versions.outputs.nodeVersion }}
36+
37+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
38+
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
39+
40+
- name: Install dependencies & build
41+
run: |
42+
npm ci
43+
npm run build --if-present
44+
45+
- name: Check webpack build changes
46+
run: |
47+
bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1"
48+
49+
- name: Show changes on failure
50+
if: failure()
51+
run: |
52+
git status
53+
git --no-pager diff

0 commit comments

Comments
 (0)