Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Integration][PagerDuty] PORT-10680 Added default action to PagerDuty #1075

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

oiadebayo
Copy link
Member

Description

What -
Implemented a default "Trigger incident" action for the PagerDuty Integration. This action allows users to create a PagerDuty incident with user inputs for title and description, notifying the on-call team of critical issues.

Why -
To improve the ease of creating and managing incidents within the PagerDuty integration. This default action helps users quickly trigger incidents with minimal configuration, driving higher engagement and adoption. It also leverages the new secret referencing feature for secure interactions via webhooks.

How -

  • Added a default action definition for triggering PagerDuty incidents with required fields such as title and description.
  • Configured webhook invocation to trigger the incident creation in PagerDuty, with appropriate headers and secret references for secure API access.

Type of change

Please leave one option from the following and delete the rest:

  • New feature (non-breaking change which adds functionality)

All tests should be run against the port production environment(using a testing org).

Core testing checklist

  • Integration able to create all default resources from scratch
  • Resync finishes successfully
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Scheduled resync able to abort existing resync and start a new one
  • Tested with at least 2 integrations from scratch
  • Tested with Kafka and Polling event listeners
  • Tested deletion of entities that don't pass the selector

Integration testing checklist

  • Integration able to create all default resources from scratch
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Resync finishes successfully
  • If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the examples folder in the integration directory.
  • If resource kind is updated, run the integration with the example data and check if the expected result is achieved
  • If new resource kind is added or updated, validate that live-events for that resource are working as expected
  • Docs PR link here

Preflight checklist

  • Handled rate limiting
  • Handled pagination
  • Implemented the code in async
  • Support Multi account

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

API Documentation

Provide links to the API documentation used for this integration.

@oiadebayo oiadebayo requested a review from PeyGis October 14, 2024 08:39
@oiadebayo oiadebayo requested a review from a team as a code owner October 14, 2024 08:39
Copy link
Contributor

@PeyGis PeyGis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall. left some minor comment. Please apply the same to the Jira action

"method": "POST",
"headers": {
"RUN_ID": "{{ .run.id }}",
"Authorization": "Token token={{ .secrets.PAGERDUTY_API_TOKEN }}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have a unified secret naming using secrets.variable_name. I see we have different format for the snyk and jira

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"Authorization": "Token token={{ .secrets.pagerduty_token }}",
"Accept": "application/vnd.pagerduty+json;version=2",
"Content-Type": "application/json",
"From": "{{ .trigger.by.user.email }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the From part of the acceptable PagerDuty header properties? I'm curious if this is to show who the sender of the incident is from the PagerDuty dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants