Skip to content

Commit

Permalink
Remove the attempt to validate the pdmergeaction option; it wasn't wo…
Browse files Browse the repository at this point in the history
…rking

and doesn't add enough value to be worth digging into further (anything
other than `merge` or `resolve` gets treated same as `ignore`).

And a tiny bit more debugging.
  • Loading branch information
eric-eisenhart committed Jul 28, 2023
1 parent cabce59 commit 6a54712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pd2zabbix.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ our $config = AppConfig->new(
pdmergeaction => {
DEFAULT => 'ignore',
ARGCOUNT => ARGCOUNT_ONE,
VALIDATE => qr/^(merge|ignore|resolve)$/,
},
);

Expand Down Expand Up @@ -232,6 +231,7 @@ sub pagerduty_handle_webhook {
# Special case: merged incidents
if ( $event_type eq 'incident.resolved' && $event->{'data'}{'resolve_reason'}{'type'} eq 'merge_resolve_reason' ) {
warn("PD events merged...\n") if $DEBUG >= 1;
warn("pdmergeaction=".$config->get('pdmergeaction')."\n") if $DEBUG >= 2;

if ( $config->get('pdmergeaction') eq 'merge' ) {
warn("Merging this incident into another\n") if $DEBUG >= 1;
Expand Down

0 comments on commit 6a54712

Please sign in to comment.