From eb5c2b6e66a81aeb0aafe6350a92a5ef111d415d Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 20 May 2024 12:55:10 +1200 Subject: [PATCH] MNT Run module-standardiser --- .github/workflows/dispatch-ci.yml | 21 +++++++++++++++++++++ .github/workflows/keepalive.yml | 21 +++++++++++++++++++++ .github/workflows/merge-up.yml | 22 ++++++++++++++++++++++ .github/workflows/update-js.yml | 23 +++++++++++++++++++++++ CONTRIBUTING.md | 15 --------------- LICENSE.md => LICENSE | 0 composer.json | 6 ++++-- phpstan.neon.dist | 3 +++ 8 files changed, 94 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/dispatch-ci.yml create mode 100644 .github/workflows/keepalive.yml create mode 100644 .github/workflows/merge-up.yml create mode 100644 .github/workflows/update-js.yml delete mode 100644 CONTRIBUTING.md rename LICENSE.md => LICENSE (100%) create mode 100644 phpstan.neon.dist diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml new file mode 100644 index 0000000..a71903e --- /dev/null +++ b/.github/workflows/dispatch-ci.yml @@ -0,0 +1,21 @@ +name: Dispatch CI + +on: + # At 4:20 PM UTC, only on Thursday and Friday + schedule: + - cron: '20 16 * * 4,5' + +permissions: {} + +jobs: + dispatch-ci: + name: Dispatch CI + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + permissions: + contents: read + actions: write + steps: + - name: Dispatch CI + uses: silverstripe/gha-dispatch-ci@v1 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml new file mode 100644 index 0000000..e0aaad0 --- /dev/null +++ b/.github/workflows/keepalive.yml @@ -0,0 +1,21 @@ +name: Keepalive + +on: + # At 1:05 PM UTC, on day 26 of the month + schedule: + - cron: '5 13 26 * *' + workflow_dispatch: + +permissions: {} + +jobs: + keepalive: + name: Keepalive + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Keepalive + uses: silverstripe/gha-keepalive@v1 diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml new file mode 100644 index 0000000..78053c1 --- /dev/null +++ b/.github/workflows/merge-up.yml @@ -0,0 +1,22 @@ +name: Merge-up + +on: + # At 4:20 PM UTC, only on Monday + schedule: + - cron: '20 16 * * 1' + workflow_dispatch: + +permissions: {} + +jobs: + merge-up: + name: Merge-up + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + permissions: + contents: write + actions: write + steps: + - name: Merge-up + uses: silverstripe/gha-merge-up@v1 diff --git a/.github/workflows/update-js.yml b/.github/workflows/update-js.yml new file mode 100644 index 0000000..7b2e9d6 --- /dev/null +++ b/.github/workflows/update-js.yml @@ -0,0 +1,23 @@ +name: Update JS + +on: + workflow_dispatch: + # Run on a schedule of once per quarter + schedule: + - cron: '40 20 1 */3 *' + +permissions: {} + +jobs: + update-js: + name: Update JS + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write + steps: + - name: Update JS + uses: silverstripe/gha-update-js@v1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index b576a73..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -# Contributing - -- Maintenance on this module is a shared effort of those who use it -- To contribute improvements to the code, ensure you raise a pull request and discuss with the module maintainers -- Please follow the Silverstripe CMS [code contribution guidelines](https://docs.silverstripe.org/en/contributing/code/) and [Module Standard](https://docs.silverstripe.org/en/developer_guides/extending/modules/#module-standard) -- Supply documentation that follows the [GitHub Flavored Markdown](https://help.github.com/articles/markdown-basics/) conventions -- When having discussions about this module in issues or pull request please adhere to the [Silverstripe CMS Community Code of Conduct](https://docs.silverstripe.org/en/project_governance/code_of_conduct/) - -## Contributor license agreement - -By supplying code to this module in patches, tickets and pull requests, you agree to assign copyright -of that code to MODULE_COPYRIGHT_HOLDER_HERE., on the condition that these code changes are released under the -same BSD license as the original module. We ask for this so that the ownership in the license is clear -and unambiguous. By releasing this code under a permissive license such as BSD, this copyright assignment -won't prevent you from using the code in any way you see fit. diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/composer.json b/composer.json index 6abd10a..30a27d0 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,10 @@ "silverstripe/admin": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.7" + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.7", + "silverstripe/standards": "^1", + "phpstan/extension-installer": "^1.3" }, "autoload": { "psr-4": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..beb9de3 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,3 @@ +parameters: + paths: + - src