From a9c54215fdc6dda149b5047ad4411b1e14693492 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 16 May 2024 10:25:44 +1200 Subject: [PATCH] MNT Run module-standardiser --- .github/workflows/dispatch-ci.yml | 9 ++- .github/workflows/keepalive.yml | 8 ++- .github/workflows/merge-up.yml | 9 ++- CONTRIBUTING.md | 91 ------------------------------- 4 files changed, 20 insertions(+), 97 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml index dbfd4b9..202aa75 100644 --- a/.github/workflows/dispatch-ci.yml +++ b/.github/workflows/dispatch-ci.yml @@ -1,9 +1,11 @@ name: Dispatch CI on: - # At 5:25 AM UTC, only on Tuesday and Wednesday + # At 2:10 PM UTC, only on Thursday and Friday schedule: - - cron: '25 5 * * 2,3' + - cron: '10 14 * * 4,5' + +permissions: {} jobs: dispatch-ci: @@ -11,6 +13,9 @@ jobs: # 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 index f604d79..b1ed6a8 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -1,17 +1,21 @@ name: Keepalive on: - # At 5:25 AM UTC, on day 10 of the month + # At 2:10 PM UTC, on day 19 of the month schedule: - - cron: '25 5 10 * *' + - cron: '10 14 19 * *' 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 index 62dd390..0c6bab7 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -1,17 +1,22 @@ name: Merge-up on: - # At 5:25 AM UTC, only on Saturday + # At 2:10 PM UTC, only on Monday schedule: - - cron: '25 5 * * 6' + - cron: '10 14 * * 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/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 0c561d8..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,91 +0,0 @@ -# Contributing - -Contributions are welcome! You can help making this module better by explaining -a bug, suggest a change or a new feature. The correct way to do -that is to [create an issue](https://github.com/silverstripe/silverstripe-dynamodb/issues). - -We accept proposed code changes via [pull requests](https://github.com/silverstripe/silverstripe-dynamodb/pulls). - -## Tests - -Tests must pass and new functionality should be extended to cover any new lines -of code. See the [SilverStripe Unit and Integration Testing](https://docs.silverstripe.org/en/3.3/developer_guides/testing/) -documentation. - -## Code style - -The code to this module is following the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/) -with the exception of SilverStripe spefic variable naming like `private static -$has_many` etc. We will not merge code that doesn't adhere to the standard. -Every push to a PR will run a code quality check via https://scrutinizer-ci.com/ and the results will -show in the Github PR. - -It's also possible to use the [PHP Coding Standards Fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) -to check and fix the code style for you. - -## Commit messages - -Having good commit messages serves multiple purposes: - -- To speed up the reviewing process. -- To help us write a good release note. -- To help the future maintainers of this module finding out why a particular - change was made to the code or why a specific feature was added. - -Structure your commit message like this: - -> Short (50 chars or less) summary of changes -> -> More detailed explanatory text, if necessary. Wrap it to about 72 characters -> or so. In some contexts, the first line is treated as the subject of an email -> and the rest of the text as the body. The blank line separating the summary -> from the body is critical (unless you omit the body entirely); tools like -> rebase can get confused if you run the two together. -> -> Further paragraphs come after blank lines. -> -> * Bullet points are okay, too -> -> * An asterisk is used for the bullet, preceded by a single space, with blank -> lines in between, but conventions vary here -> -> Source [http://git-scm.com/book/ch5-2.html](http://git-scm.com/book/ch5-2.html) - -Write the summary line and description of what you have done in the imperative -mode, that is as if you were commanding someone. Start the line with "`Fix`", -"`Add`", "`Change`" instead of "Fixed", "Added", "Changed". - -Don't end the summary line with a period - it's a title and titles don't end -with a period. - -Always leave the second line blank. - -If you are having trouble expressing the change in a short subject line, you -probably need to make several commits, see below: - -## How to group changes together - -Group related commits into one commit. Try finding a set of changes that -describes a minmal working chnage and commit them as one change. This might be -better descibed with a good and bad example: - -*Bad* - - - change variable name to blah - - add check if user is logged in - - clean up whitespace - - reset users password and send email - -*Good* - - - add possibility for users to reset passwords - -*Bad* - - - fix bug on user password reset and remove old password resets - -*Good* - - - fix bug on user password reset - - remove old reset tokens from database -