From cfec7a85be6351fe1d3c9ae6c249d70a4f2f02b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Fri, 4 Sep 2020 22:42:28 +0200 Subject: [PATCH] Move to automated dependabot merging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- .github/dependabot.yml | 24 ++++++++++++++ .../workflows/dependabot-approve-merge.yml | 19 ++++++++++++ .github/workflows/dependabot-approve.yml | 11 ------- composer.json | 31 ++++++++++--------- 4 files changed, 59 insertions(+), 26 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-approve-merge.yml delete mode 100644 .github/workflows/dependabot-approve.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..16504243 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +updates: +- package-ecosystem: composer + directory: "/" + schedule: + interval: weekly + day: saturday + time: "03:00" + timezone: Europe/Paris + open-pull-requests-limit: 10 + labels: + - 3. to review + - dependencies +- package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + day: saturday + time: "03:00" + timezone: Europe/Paris + open-pull-requests-limit: 10 + labels: + - 3. to review + - dependencies diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml new file mode 100644 index 00000000..201d7f5e --- /dev/null +++ b/.github/workflows/dependabot-approve-merge.yml @@ -0,0 +1,19 @@ +name: Dependabot +on: pull_request + +jobs: + auto-merge: + runs-on: ubuntu-latest + steps: + # Default github action approve + - uses: hmarr/auto-approve-action@v2.0.0 + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + # Nextcloud bot approve and merge request + - uses: ahmadnassri/action-dependabot-auto-merge@v1 + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + with: + target: patch + github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }} diff --git a/.github/workflows/dependabot-approve.yml b/.github/workflows/dependabot-approve.yml deleted file mode 100644 index cc5e6d17..00000000 --- a/.github/workflows/dependabot-approve.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Dependabot auto approve -on: pull_request - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: hmarr/auto-approve-action@v2.0.0 - if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/composer.json b/composer.json index b9ffd17d..8fdff1f3 100644 --- a/composer.json +++ b/composer.json @@ -1,19 +1,20 @@ { "name": "nextcloud/forms", - "type": "project", - "license": "AGPLv3", + "config": { + "optimize-autoloader": true, + "classmap-authoritative": true, + "platform": { + "php": "7.2" + } + }, + "scripts": { + "cs:fix": "php-cs-fixer fix", + "cs:check": "php-cs-fixer fix --dry-run --diff", + "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l" + }, "require-dev": { - "christophwurst/nextcloud": "^19.0", - "phpunit/phpunit": "^8", - "nextcloud/coding-standard": "^0.3.0" - }, - "config": { - "optimize-autoloader": true, - "classmap-authoritative": true - }, - "scripts": { - "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l", - "cs:check": "php-cs-fixer fix --dry-run --diff", - "cs:fix": "php-cs-fixer fix" - } + "christophwurst/nextcloud": "^19.0", + "nextcloud/coding-standard": "^0.3.0", + "phpunit/phpunit": "^7" + } }