Skip to content

Commit

Permalink
Merge pull request #252 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Deploy 17/04/24
  • Loading branch information
lazysoundsystem authored Apr 16, 2024
2 parents aedd182 + 6f020ae commit cd7c0ce
Show file tree
Hide file tree
Showing 12 changed files with 565 additions and 414 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2

# PHPStan's baseline uses tabs instead of spaces.
core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php

# Define binary file attributes.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/composer-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
with:
github_access_token: ${{ secrets.PAT }}
patch_branch: 'develop'
patch_packages: 'drupal/*'
patch_maintainers: ${{ secrets.DRUPAL_MAINTAINERS }}
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_name: ${{ secrets.SLACK_CHANNEL }}
flowdock_token: ${{ secrets.FLOWDOCK_TOKEN }}
slack_channel_name: ${{ vars.SLACK_CHANNEL }}
29 changes: 25 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### Build output
### Test run output
#### Composer Validate `${{ steps.validate.outcome }}`
#### PHP Lint `${{ steps.lint.outcome }}`
#### Docker Build `${{ steps.build.outcome }}`
Expand All @@ -208,6 +208,27 @@ jobs:
<details><summary>Software Versions</summary>
<code>${{ steps.versions.outputs.stdout }}</code>
</details>
<details><summary>Composer Validate</summary>
<code>${{ steps.validate.outputs.stdout }}</code>
<code>${{ steps.validate.outputs.stderr }}</code>
</details>
<details><summary>PHP Lint</summary>
<code>${{ steps.lint.outputs.stdout }}</code>
<code>${{ steps.lint.outputs.stderr }}</code>
</details>
<details><summary>PHPCS</summary>
<code>${{ steps.phpcs.outputs.stdout }}</code>
<code>${{ steps.phpcs.outputs.stderr }}</code>
</details>
<details><summary>Tests</summary>
<code>${{ steps.tests.outputs.stdout }}</code>
<code>${{ steps.tests.outputs.stderr }}</code>
</details>
<details><summary>Drupal Logs</summary>
<code>${{ steps.dblog.outputs.stdout }}</code>
</details>
Expand All @@ -220,7 +241,7 @@ jobs:
if: ${{ !env.ACT && success() }}
uses: slackapi/[email protected]
with:
channel-id: '${{ secrets.SLACK_CHANNEL }}'
channel-id: '${{ vars.SLACK_CHANNEL }}'
payload: |
{
"text": "Tests passed for a pull request on ${{ github.repository }}",
Expand All @@ -247,7 +268,7 @@ jobs:
if: ${{ !env.ACT && failure() }}
uses: slackapi/[email protected]
with:
channel-id: '${{ secrets.SLACK_CHANNEL }}'
channel-id: '${{ vars.SLACK_CHANNEL }}'
payload: |
{
"text": "Tests failed for a pull request on ${{ github.repository }}",
Expand Down Expand Up @@ -275,6 +296,6 @@ jobs:
uses: cafuego/command-output@main
with:
run: |
docker compose -f tests/docker-compose.yml down
docker compose -f tests/docker-compose.yml down --rmi local -v
env:
fail-fast: true
18 changes: 18 additions & 0 deletions PATCHES/amazon_ses-3417090-cron-queue-14.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/Plugin/QueueWorker/AmazonSesMailQueue.php b/src/Plugin/QueueWorker/AmazonSesMailQueue.php
index dc410504566451d20aec939de6953e6d1a6e9be9..fdc7af32ac6634c51283fb38f0227530a1772735 100644
--- a/src/Plugin/QueueWorker/AmazonSesMailQueue.php
+++ b/src/Plugin/QueueWorker/AmazonSesMailQueue.php
@@ -29,7 +29,12 @@ class AmazonSesMailQueue extends QueueWorkerBase implements ContainerFactoryPlug
$plugin_definition
);

- $instance->setHandler($container->get('amazon_ses.handler'));
+ // Only set the handler if queueing is enabled to avoid an error when
+ // trying to run without config.
+ $enabled = \Drupal::config('amazon_ses.settings')->get('queue');
+ if ($enabled) {
+ $instance->setHandler($container->get('amazon_ses.handler'));
+ }

return $instance;
}
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
],
"require": {
"php": ">=8.1",
"composer/installers": "^1.12",
"composer/installers": "^2",
"cweagans/composer-patches": "^1.7",
"drupal/admin_denied": "^2.0",
"drupal/allowed_formats": "^3",
"drupal/amazon_ses": "^3.0",
"drupal/amazon_ses": "^3",
"drupal/aws": "dev-2.0.x",
"drupal/bcc": "^4",
"drupal/classy": "^1.0",
"drupal/components": "^3.0@beta",
Expand Down Expand Up @@ -63,6 +64,7 @@
"drupal/coder": "^8.3",
"drupal/config_filter": "^2.2",
"drupal/devel": "^5.0",
"drupal/stage_file_proxy": "^2.1",
"kint-php/kint": "^5",
"mikey179/vfsstream": "^1.6",
"phpcompatibility/php-compatibility": "^9.3",
Expand All @@ -89,6 +91,9 @@
"phpstan/extension-installer": true,
"symfony/flex": true,
"php-http/discovery": true
},
"audit": {
"abandoned": "report"
}
},
"autoload": {
Expand Down
Loading

0 comments on commit cd7c0ce

Please sign in to comment.