From fe6eff338eafd18f16010ebcc939e9e7ab76406b Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Sat, 13 Jul 2024 10:20:24 +0200 Subject: [PATCH] chore: update workflows from templates Signed-off-by: skjnldsv Signed-off-by: Jonas --- .github/workflows/app-upgrade-mysql.yml | 3 +++ .github/workflows/app-upgrade-postgres.yml | 3 +++ .github/workflows/behat-sqlite-encryption.yml | 3 +++ .github/workflows/behat-sqlite.yml | 3 +++ .../workflows/{cypress.yml => cypress-e2e.yml} | 7 +++++-- .github/workflows/dependabot-approve-merge.yml | 2 +- .github/workflows/lint-eslint.yml | 9 ++++++--- .github/workflows/lint-info-xml.yml | 3 +++ .github/workflows/lint-php-cs.yml | 3 +++ .github/workflows/lint-php.yml | 3 +++ .github/workflows/lint-stylelint.yml | 5 ++++- .github/workflows/node.yml | 11 +++++++++-- .github/workflows/occ-cli-mysql.yml | 3 +++ .github/workflows/pages.yml | 4 +++- .github/workflows/phpunit-sqlite.yml | 16 +++++++++++----- .github/workflows/pr-feedback.yml | 15 ++++++++++++--- .github/workflows/psalm.yml | 3 +++ .github/workflows/renovate-approve-merge.yml | 3 +++ .../workflows/update-nextcloud-ocp-matrix.yml | 9 ++++++--- 19 files changed, 87 insertions(+), 21 deletions(-) rename .github/workflows/{cypress.yml => cypress-e2e.yml} (97%) diff --git a/.github/workflows/app-upgrade-mysql.yml b/.github/workflows/app-upgrade-mysql.yml index e78b5f92b..b81eb02eb 100644 --- a/.github/workflows/app-upgrade-mysql.yml +++ b/.github/workflows/app-upgrade-mysql.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: app upgrade mysql on: pull_request diff --git a/.github/workflows/app-upgrade-postgres.yml b/.github/workflows/app-upgrade-postgres.yml index c4e6b9eef..2b989c277 100644 --- a/.github/workflows/app-upgrade-postgres.yml +++ b/.github/workflows/app-upgrade-postgres.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: app upgrade pgsql on: pull_request diff --git a/.github/workflows/behat-sqlite-encryption.yml b/.github/workflows/behat-sqlite-encryption.yml index 4325027e4..227b98ca1 100644 --- a/.github/workflows/behat-sqlite-encryption.yml +++ b/.github/workflows/behat-sqlite-encryption.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Behat on: pull_request diff --git a/.github/workflows/behat-sqlite.yml b/.github/workflows/behat-sqlite.yml index 83317f622..c96e539fd 100644 --- a/.github/workflows/behat-sqlite.yml +++ b/.github/workflows/behat-sqlite.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Behat on: pull_request diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress-e2e.yml similarity index 97% rename from .github/workflows/cypress.yml rename to .github/workflows/cypress-e2e.yml index fa47ee93d..f0a7809a5 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress-e2e.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Cypress on: pull_request @@ -120,7 +123,7 @@ jobs: node-version: ${{ steps.versions.outputs.nodeVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' - name: Install node dependencies & build app working-directory: apps/${{ env.APP_NAME }} @@ -177,7 +180,7 @@ jobs: node-version: ${{ needs.init.outputs.nodeVersion }} - name: Set up npm ${{ needs.init.outputs.npmVersion }} - run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}" + run: npm i -g 'npm@${{ needs.init.outputs.npmVersion }}' - name: Set up php ${{ matrix.php-versions }} uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index b5a8f0b8c..0d6b2c26d 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -31,7 +31,7 @@ jobs: pull-requests: write steps: - # Github actions bot approve + # GitHub actions bot approve - uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index 428e2c0b8..269675e08 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -3,8 +3,8 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # -# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint eslint @@ -20,6 +20,9 @@ concurrency: jobs: changes: runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} @@ -68,7 +71,7 @@ jobs: node-version: ${{ steps.versions.outputs.nodeVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' - name: Install dependencies env: diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml index 46b13343a..736a89502 100644 --- a/.github/workflows/lint-info-xml.yml +++ b/.github/workflows/lint-info-xml.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint info.xml diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index f08215cb0..27145a662 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint php-cs diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 19b5462a8..decf96e81 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint php diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 5c5614d53..379163870 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Lint stylelint @@ -37,7 +40,7 @@ jobs: node-version: ${{ steps.versions.outputs.nodeVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' - name: Install dependencies env: diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index e01909823..9eee2c6cf 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Node @@ -17,6 +20,9 @@ concurrency: jobs: changes: runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} @@ -62,13 +68,14 @@ jobs: node-version: ${{ steps.versions.outputs.nodeVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' - name: Install dependencies env: CYPRESS_INSTALL_BINARY: 0 PUPPETEER_SKIP_DOWNLOAD: true - run: npm ci + run: | + npm ci - name: Test run: npm test diff --git a/.github/workflows/occ-cli-mysql.yml b/.github/workflows/occ-cli-mysql.yml index d0373912e..ca97cce26 100644 --- a/.github/workflows/occ-cli-mysql.yml +++ b/.github/workflows/occ-cli-mysql.yml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: occ cli on: diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index bf61d6eda..836f49eb6 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,4 +1,6 @@ -# Sample workflow for building and deploying a Hugo site to GitHub Pages +# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT + name: Deploy documentation to Github Pages on: diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index c10a191aa..46ef0d644 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: PHPUnit SQLite @@ -30,6 +33,9 @@ jobs: changes: runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} @@ -60,8 +66,8 @@ jobs: strategy: matrix: - php-versions: ['8.2'] - server-versions: ['stable27', 'master'] + php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} + server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} name: SQLite PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} @@ -103,7 +109,7 @@ jobs: - name: Check composer file existence id: check_composer - uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 with: files: apps/${{ env.APP_NAME }}/composer.json @@ -126,7 +132,7 @@ jobs: continue-on-error: true working-directory: apps/${{ env.APP_NAME }} run: | - composer run --list | grep "^ test:unit " | wc -l | grep 1 + composer run --list | grep '^ test:unit ' | wc -l | grep 1 - name: PHPUnit # Only run if phpunit config file exists @@ -139,7 +145,7 @@ jobs: continue-on-error: true working-directory: apps/${{ env.APP_NAME }} run: | - composer run --list | grep "^ test:integration " | wc -l | grep 1 + composer run --list | grep '^ test:integration ' | wc -l | grep 1 - name: Run Nextcloud # Only run if phpunit integration config file exists diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index 940eda231..7b68226f8 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -24,18 +24,27 @@ jobs: id: scrape with: website: 'https://nextcloud.com/team/' + + - name: Get blocklist + id: blocklist + run: | + blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -) + echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT" + - uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4 with: feedback-message: | Hello there, - Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. + Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. We hope that the review 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 review 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! + + (If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).) days-before-feedback: 14 - start-date: "2023-07-10" - exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot" + start-date: '2024-04-30' + exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot' exempt-bots: true diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index deadec367..24d58572c 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Static analysis diff --git a/.github/workflows/renovate-approve-merge.yml b/.github/workflows/renovate-approve-merge.yml index 05293cc55..393779ac1 100644 --- a/.github/workflows/renovate-approve-merge.yml +++ b/.github/workflows/renovate-approve-merge.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Auto approve renovate PRs diff --git a/.github/workflows/update-nextcloud-ocp-matrix.yml b/.github/workflows/update-nextcloud-ocp-matrix.yml index e21de7ff3..0af5d8883 100644 --- a/.github/workflows/update-nextcloud-ocp-matrix.yml +++ b/.github/workflows/update-nextcloud-ocp-matrix.yml @@ -2,6 +2,9 @@ # # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT name: Update nextcloud/ocp @@ -81,12 +84,12 @@ jobs: uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 with: token: ${{ secrets.COMMAND_BOT_PAT }} - commit-message: "chore(dev-deps): Bump nextcloud/ocp package" + commit-message: 'chore(dev-deps): Bump nextcloud/ocp package' committer: GitHub author: nextcloud-command signoff: true - branch: automated/noid/${{ matrix.branches }}-update-nextcloud-ocp - title: "[${{ matrix.branches }}] Update nextcloud/ocp dependency" + branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp' + title: '[${{ matrix.branches }}] Update nextcloud/ocp dependency' body: | Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency labels: |