Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/composer/phpstan/phpstan-1.10.39
Browse files Browse the repository at this point in the history
  • Loading branch information
edmund-dunn authored Oct 20, 2023
2 parents e099cb3 + 0246ac7 commit df605e8
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/pw-clp-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Request a new Campaign Landing Page, owned by Public
Websites team
title: 'Campaign Landing Page request: <content info>'
labels: Needs refining, Public Websites, VA.gov frontend, User support, CLP
assignees: jilladams, wesrowe
assignees: jilladams, FranECross

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/pw-dark-launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: Request to dark launch CMS content that includes React widget, owned by P
Websites team
title: 'CMS/React content dark launch request: <content info>'
labels: Drupal engineering, Needs refining, Public Websites, VA.gov frontend
assignees: jilladams, wesrowe
assignees: jilladams, FranECross

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/pw-forms-bad-pdf-link-pw.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "(PW) Forms/Bad PDF link defect"
about: Forms outages / Bad PDF links, owned by Public Websites team
title: 'Forms defect: <form name>'
labels: Defect, Find a form, Needs refining, Public Websites
assignees: jilladams, wesrowe
assignees: jilladams, FranECross

---

Expand Down
98 changes: 98 additions & 0 deletions .github/ISSUE_TEMPLATE/taxonomy-add-term.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

name: "Taxonomy - Add Term"
description: "Use this template when adding terms to the Service or Benefit taxonomy."
title: "[ADD] (Term name) to (taxonomy name)"
labels: Content, Content governance

body:

- type: dropdown
id: which-taxonomy
attributes:
label: Which Taxonomy is this term for?
multiple: false
options:
- VA Benefits taxonomy
- VA services taxonomy
- Other
validations:
required: true
- type: input
id: term-name
attributes:
label: Proposed term name/label
description: e.g. Veterans Pension
validations:
required: true
- type: input
id: machine-name
attributes:
label: Proposed machine name/ API ID
description: va_service_veterans_pension
validations:
required: false
- type: dropdown
id: overlap
attributes:
label: Does this overlap with any existing term in the taxonomy?
multiple: false
options:
- 'Yes'
- 'No'
validations:
required: true
- type: textarea
id: rationale
attributes:
label: Rationale for adding this term
description: Write a short explanation of why this term is needed. Include links to any relevant issues, research findings, etc.
validations:
required: true
- type: dropdown
id: products
attributes:
label: Which products will this term impact?
multiple: true
options:
- VAMCs
- Vet Centers
- VBA Regional Office
- Benefit hubs
- Other
validations:
required: false
- type: dropdown
id: stakeholders
attributes:
label: Have stakeholders from impacted products been consulted?
multiple: false
options:
- 'Yes'
- 'No'
validations:
required: true
- type: dropdown
id: subfields
attributes:
label: Have you drafted content for all the relevant subfields?
multiple: false
options:
- 'Yes'
- 'No'
validations:
required: true
- type: textarea
id: acceptance-critera
attributes:
label: Acceptance Criteria
description: Customize the Acceptance Critera or use the default
value: |
- [ ] Term is reviewed by relevant taxonomy governance body
- [ ] Term is either approved for addition, or denied with an explanation
- [ ] If approved, a Drupal admin from Product team may add the term to the taxonomy
- [ ] Content for subfields is drafted in Drupal by Product team
- [ ] (List any necessary review and approval steps here)
- [ ] Term is published
validations:
required: true

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"symfony/phpunit-bridge": "^5.1",
"symfony/process": "^4.0",
"symfony/routing": "^4.0",
"va-gov/content-build": "^0.0.3365",
"va-gov/content-build": "^0.0.3369",
"vlucas/phpdotenv": "^5.3",
"webflo/drupal-finder": "^1.0.0",
"webmozart/path-util": "^2.3",
Expand Down
66 changes: 35 additions & 31 deletions composer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e9adba863abc9a67b2c92b6f2e3788f8",
"content-hash": "894f4b5da47c94fd3b7be8d4f4b51a9d",
"packages": [
{
"name": "alchemy/zippy",
Expand Down Expand Up @@ -6574,17 +6574,17 @@
},
{
"name": "drupal/geofield_map",
"version": "3.0.12",
"version": "3.0.14",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/geofield_map.git",
"reference": "3.0.12"
"reference": "3.0.14"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/geofield_map-3.0.12.zip",
"reference": "3.0.12",
"shasum": "ef0d5af83607c4fe84e8c1ac9960fa93beefaa98"
"url": "https://ftp.drupal.org/files/projects/geofield_map-3.0.14.zip",
"reference": "3.0.14",
"shasum": "8f87ab5587f113e415fc09091f62f2425843e123"
},
"require": {
"drupal/core": "^9.3 || ^10",
Expand All @@ -6593,8 +6593,8 @@
"type": "drupal-module",
"extra": {
"drupal": {
"version": "3.0.12",
"datestamp": "1693440081",
"version": "3.0.14",
"datestamp": "1696883247",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand Down Expand Up @@ -12032,26 +12032,26 @@
},
{
"name": "drupal/string_field_formatter",
"version": "2.0.2",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/string_field_formatter.git",
"reference": "2.0.2"
"reference": "2.0.3"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/string_field_formatter-2.0.2.zip",
"reference": "2.0.2",
"shasum": "22055a38ffaa0de12802be186bf348c1aeb1a52f"
"url": "https://ftp.drupal.org/files/projects/string_field_formatter-2.0.3.zip",
"reference": "2.0.3",
"shasum": "1268d1ac2c811130e3524700639ef9c42f83f8c1"
},
"require": {
"drupal/core": "^8 || ^9 || ^10"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "2.0.2",
"datestamp": "1687527067",
"version": "2.0.3",
"datestamp": "1696786969",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
Expand All @@ -12066,6 +12066,10 @@
{
"name": "Denes.Szabo",
"homepage": "https://www.drupal.org/user/582668"
},
{
"name": "xmacinfo",
"homepage": "https://www.drupal.org/user/12131"
}
],
"description": "Adds formatters to plain string type field.",
Expand Down Expand Up @@ -15135,41 +15139,41 @@
},
{
"name": "laminas/laminas-feed",
"version": "2.21.0",
"version": "2.22.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-feed.git",
"reference": "52918789a417bc292ccd6fbb4b91bd78a65d50ab"
"reference": "669792b819fca7274698147ad7a2ecc1b0a9b141"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-feed/zipball/52918789a417bc292ccd6fbb4b91bd78a65d50ab",
"reference": "52918789a417bc292ccd6fbb4b91bd78a65d50ab",
"url": "https://api.github.com/repos/laminas/laminas-feed/zipball/669792b819fca7274698147ad7a2ecc1b0a9b141",
"reference": "669792b819fca7274698147ad7a2ecc1b0a9b141",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"laminas/laminas-escaper": "^2.9",
"laminas/laminas-stdlib": "^3.6",
"php": "~8.1.0 || ~8.2.0"
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
},
"conflict": {
"laminas/laminas-servicemanager": "<3.3",
"zendframework/zend-feed": "*"
},
"require-dev": {
"laminas/laminas-cache": "^2.13.2 || ^3.10.1",
"laminas/laminas-cache": "^2.13.2 || ^3.11",
"laminas/laminas-cache-storage-adapter-memory": "^1.1.0 || ^2.2",
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-db": "^2.18",
"laminas/laminas-http": "^2.18",
"laminas/laminas-servicemanager": "^3.21.0",
"laminas/laminas-validator": "^2.30.1",
"phpunit/phpunit": "^10.2.6",
"laminas/laminas-validator": "^2.38",
"phpunit/phpunit": "^10.3.1",
"psalm/plugin-phpunit": "^0.18.4",
"psr/http-message": "^2.0",
"vimeo/psalm": "^5.13.1"
"vimeo/psalm": "^5.14.1"
},
"suggest": {
"laminas/laminas-cache": "Laminas\\Cache component, for optionally caching feeds between requests",
Expand Down Expand Up @@ -15211,7 +15215,7 @@
"type": "community_bridge"
}
],
"time": "2023-07-24T09:21:16+00:00"
"time": "2023-10-11T20:16:37+00:00"
},
{
"name": "laminas/laminas-servicemanager",
Expand Down Expand Up @@ -26886,16 +26890,16 @@
},
{
"name": "va-gov/content-build",
"version": "v0.0.3365",
"version": "v0.0.3369",
"source": {
"type": "git",
"url": "https://github.com/department-of-veterans-affairs/content-build.git",
"reference": "3f693d41da6310ae64e1234b6e712e41829e6829"
"reference": "249c6e57df98911b8d2a9f47df0fede6be4f539c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/department-of-veterans-affairs/content-build/zipball/3f693d41da6310ae64e1234b6e712e41829e6829",
"reference": "3f693d41da6310ae64e1234b6e712e41829e6829",
"url": "https://api.github.com/repos/department-of-veterans-affairs/content-build/zipball/249c6e57df98911b8d2a9f47df0fede6be4f539c",
"reference": "249c6e57df98911b8d2a9f47df0fede6be4f539c",
"shasum": ""
},
"type": "node-project",
Expand All @@ -26922,9 +26926,9 @@
"description": "Front-end for VA.gov. This repository contains the code that generates the www.va.gov website. It contains a Metalsmith static site builder that uses a Drupal CMS for content. This file is here to publish releases to https://packagist.org/packages/va-gov/content-build, so that the CMS CI system can install it and update it using standard composer processes, and so that we can run tests across both systems. See https://github.com/department-of-veterans-affairs/va.gov-cms for the CMS repo, and stand by for more documentation.",
"support": {
"issues": "https://github.com/department-of-veterans-affairs/content-build/issues",
"source": "https://github.com/department-of-veterans-affairs/content-build/tree/v0.0.3365"
"source": "https://github.com/department-of-veterans-affairs/content-build/tree/v0.0.3369"
},
"time": "2023-10-10T19:32:55+00:00"
"time": "2023-10-19T17:22:32+00:00"
},
{
"name": "vlucas/phpdotenv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\post_api\Event\QueueItemProcessedEvent;
use Drupal\post_api\Service\AddToQueue;
use Drupal\slack\Slack;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
* Class QueueItemProcessedEventSubscriber acts on post_api queue item processed.
* Acts on post_api queue item processed.
*
* @package Drupal\va_gov_post_api\EventSubscriber
*/
Expand Down Expand Up @@ -46,6 +47,13 @@ class QueueItemProcessedEventSubscriber implements EventSubscriberInterface, Con
*/
protected $slack;

/**
* The Post queue add service.
*
* @var \Drupal\post_api\Service\AddToQueue
*/
protected $postQueue;

/**
* Creates a new QueueItemProcessedEventSubscriber object.
*
Expand All @@ -57,12 +65,15 @@ class QueueItemProcessedEventSubscriber implements EventSubscriberInterface, Con
* Module handler.
* @param \Drupal\slack\Slack $slack
* Slack service.
* @param \Drupal\post_api\Service\AddToQueue $post_queue
* The PostAPI service.
*/
public function __construct(ConfigFactoryInterface $config, LoggerChannelFactoryInterface $logger, ModuleHandlerInterface $moduleHandler, Slack $slack) {
public function __construct(ConfigFactoryInterface $config, LoggerChannelFactoryInterface $logger, ModuleHandlerInterface $moduleHandler, Slack $slack, AddToQueue $post_queue) {
$this->config = $config;
$this->logger = $logger;
$this->moduleHandler = $moduleHandler;
$this->slack = $slack;
$this->postQueue = $post_queue;
}

/**
Expand All @@ -73,7 +84,8 @@ public static function create(ContainerInterface $container, array $configuratio
$container->get('config.factory'),
$container->get('logger.factory'),
$container->get('module_handler'),
$container->get('slack.slack_service')
$container->get('slack.slack_service'),
$container->get('post_api.add_to_queue'),
);
}

Expand Down Expand Up @@ -104,6 +116,8 @@ public function onQueueItemProcessed(QueueItemProcessedEvent $event) {
// The response might have been 200 from the TIC not the Facility API.
$message = sprintf('Item %s Posted with a 200, but had an unexpected response with a size: %F phrase: %s', $item_data['uid'], $size, $response_phrase);
$this->logger->get('va_gov_post_api')->warning($message);
// Add the item that might not have been processed back to the queue.
$this->postQueue->addToQueue($item_data);
}
}
elseif (in_array($response_code, [201, 202])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- { name: 'event_subscriber' }
va_gov_post_api.queue_item_processed_subsriber:
class: '\Drupal\va_gov_post_api\EventSubscriber\QueueItemProcessedEventSubscriber'
arguments: ['@config.factory', '@logger.factory', '@module_handler', '@slack.slack_service']
arguments: ['@config.factory', '@logger.factory', '@module_handler', '@slack.slack_service', '@post_api.add_to_queue']
tags:
- { name: 'event_subscriber' }
va_gov_post_api.queue_vamc_service_updates:
Expand Down

0 comments on commit df605e8

Please sign in to comment.