Skip to content

Commit

Permalink
Add newFileMenu and refactor library
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Jun 9, 2022
1 parent fa74d22 commit a168483
Show file tree
Hide file tree
Showing 24 changed files with 13,116 additions and 7,354 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,5 @@
module.exports = {
extends: [
'@nextcloud',
],
}
22 changes: 14 additions & 8 deletions .github/dependabot.yml
@@ -1,10 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
timezone: Europe/Paris
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
46 changes: 46 additions & 0 deletions .github/workflows/command-rebase.yml
@@ -0,0 +1,46 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Rebase command

on:
issue_comment:
types: created

jobs:
rebase:
runs-on: ubuntu-latest

# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')

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

- name: Checkout the latest code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}

- name: Automatic Rebase
uses: cirrus-actions/rebase@1.6
env:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}

- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@v2
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"
5 changes: 4 additions & 1 deletion .github/workflows/dependabot-approve-merge.yml
Expand Up @@ -8,19 +8,22 @@ name: Dependabot
on:
pull_request_target:
branches:
- main
- master
- stable*

jobs:
auto-approve-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
# Github actions bot approve
- uses: hmarr/auto-approve-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.COMMAND_BOT_PAT }}

# Nextcloud bot approve and merge request
- uses: ahmadnassri/action-dependabot-auto-merge@v2
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/fixup.yml
@@ -0,0 +1,20 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Pull request checks

on: pull_request

jobs:
commit-message-check:
name: Block fixup and squash commits

runs-on: ubuntu-latest

steps:
- name: Run check
uses: xt0rted/block-autosquash-commits-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/node-test.yml
@@ -0,0 +1,58 @@
name: Node

on:
pull_request:
push:
branches:
- main
- master
- stable*

jobs:
test:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
strategy:
matrix:
node-version: [ 16, 18 ]
include:
- node-version: 14
coverage: coverage

name: test
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Test
run: npm run test --if-present

- name: Test and process coverage
if: matrix.coverage
run: npm run test:coverage

- name: Collect coverage
uses: codecov/codecov-action@v2
with:
files: ./coverage/lcov.info


summary:
runs-on: ubuntu-latest
needs: test
if: always()

name: test-summary
steps:
- name: Summary status
run: if ${{ needs.test.result != 'success' && needs.test.result != 'skipped' }}; then exit 1; fi
53 changes: 53 additions & 0 deletions .github/workflows/node.yml
@@ -0,0 +1,53 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Node

on:
pull_request:
push:
branches:
- main
- master
- stable*

jobs:
build:
runs-on: ubuntu-latest

name: node
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.2
id: versions
with:
fallbackNode: '^12'
fallbackNpm: '^6'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
with:
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
run: |
npm ci
npm run build --if-present
- name: Check webpack build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1"
- name: Show changes on failure
if: failure()
run: |
git status
git --no-pager diff

0 comments on commit a168483

Please sign in to comment.