From 57b1d87577101774bb3bd0883b4c87e3ff29860d Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 1 Aug 2022 09:57:47 +1200 Subject: [PATCH] MNT Standardise modules --- .github/workflows/ci.yml | 2 +- .github/workflows/keepalive.yml | 2 +- .scrutinizer.yml | 15 --------------- .travis.yml | 4 ---- README.md | 15 ++++++--------- phpunit.xml.dist | 1 + 6 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 .scrutinizer.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b43d448..5303153 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,5 @@ jobs: ci: name: CI # Only run cron on the silverstripe account - if: (github.event_name == 'schedule' && startsWith(github.repository, 'silverstripe/')) || (github.event_name != 'schedule') + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index ebf9716..4cf5fbb 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -10,7 +10,7 @@ jobs: keepalive: name: Keepalive # Only run cron on the silverstripe account - if: (github.event_name == 'schedule' && startsWith(github.repository, 'silverstripe/')) || (github.event_name != 'schedule') + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') runs-on: ubuntu-latest steps: - name: Keepalive diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 051ef9a..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,15 +0,0 @@ -inherit: true - -build: - nodes: - analysis: - tests: - override: [php-scrutinizer-run] - -checks: - php: - code_rating: true - duplication: true - -filter: - paths: [src/*, tests/*] diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c244c3b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -version: ~> 1.0 - -import: - - silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml diff --git a/README.md b/README.md index 2a5165c..e9ada92 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ # Widgets Module [![CI](https://github.com/silverstripe/silverstripe-widgets/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-widgets/actions/workflows/ci.yml) -[![SilverStripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/) -[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe/silverstripe-widgets.svg)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-widgets) -[![Code Coverage](https://img.shields.io/codecov/c/github/silverstripe/silverstripe-widgets.svg)](https://codecov.io/gh/silverstripe/silverstripe-widgets) +[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/) ## Overview @@ -12,9 +10,9 @@ the sidebar of your website. ## Requirements -* SilverStripe 4.0 +* Silverstripe 4.0 -**Note:** this version is compatible with SilverStripe 4. For SilverStripe 3, please see [the 1.x release line](https://github.com/silverstripe/silverstripe-widgets/tree/1.3). +**Note:** this version is compatible with Silverstripe 4. For Silverstripe 3, please see [the 1.x release line](https://github.com/silverstripe/silverstripe-widgets/tree/1.3). ### Installation @@ -49,7 +47,7 @@ Here's an example on how to just add widgets to a `MyPage` type, and call it By following the "Packaging" rules below, widgets are easily installed. This example uses the Blog module which by default has widgets already enabled. * Install the [blog module](https://github.com/silverstripe/silverstripe-blog/). -* Download the widget and unzip to the main folder of your SilverStripe website, e.g. to `/widget_/`. The folder +* Download the widget and unzip to the main folder of your Silverstripe website, e.g. to `/widget_/`. The folder will contain a few files, which generally won't need editing or reading. * Run `http://my-website.com/dev/build` * Login to the CMS and go to the 'Blog' page. Choose the "widgets" tab and click the new widget to activate it. @@ -204,10 +202,9 @@ class FlickrWidget extends Widget <% end_control %> ``` - ## Releasing a widget -Follow the [standard procedures defined for releasing a SilverStripe module](https://docs.silverstripe.org/en/4/developer_guides/extending/how_tos/publish_a_module). +Follow the [standard procedures defined for releasing a Silverstripe module](https://docs.silverstripe.org/en/4/developer_guides/extending/how_tos/publish_a_module). Here is a composer template you can use. @@ -255,7 +252,7 @@ You need to finish off / change: To call a single Widget in a page - without adding a widget area in the CMS for you to add / delete the widgets, you can define a merge variable in the Page Controller and include it in the Page Template. -This example creates an RSSWidget with the SilverStripe blog feed. +This example creates an RSSWidget with the Silverstripe blog feed. ```php public function SilverStripeFeed() diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6470738..28e89cd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,3 +1,4 @@ +