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

feat: Enhance PagerDuty provider: fetch historical incidents & expand metadata #1267

Conversation

onyedikachi-david
Copy link

@onyedikachi-david onyedikachi-david commented Jun 23, 2024

/claim #1262

Closes #1262

📑 Description

This PR enhances the PagerDuty provider to fetch historical incidents and expand the metadata retrieved for each incident. Key changes include:

  1. Modified the _get_alerts method to retrieve incidents from the past 30 days, with pagination support for up to 1000 incidents.
  2. Added the include[] parameter to the PagerDuty API request to fetch additional incident details.
  3. Expanded the _format_alert method to process and include comprehensive metadata such as acknowledgers, first trigger log entries, and conference bridge information.
  4. Introduced DEFAULT_LOOKBACK_DAYS, MAX_INCIDENTS, and INCLUDE_DETAILS class attributes for easy configuration.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

Copy link

vercel bot commented Jun 23, 2024

@onyedikachi-david is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Jun 23, 2024

CLA assistant check
All committers have signed the CLA.

@onyedikachi-david onyedikachi-david changed the title Enhance PagerDuty provider: fetch historical incidents & expand metadata feat: Enhance PagerDuty provider: fetch historical incidents & expand metadata Jun 23, 2024
Copy link
Contributor

@Matvey-Kuk Matvey-Kuk left a comment

Choose a reason for hiding this comment

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

May I ask you to add a unittest for _format_alert make it easier for us to debug?

@onyedikachi-david
Copy link
Author

@Matvey-Kuk GM, I don't know if you have found time to review the added test.

@Matvey-Kuk
Copy link
Contributor

Closing due to #1262 (comment)

@Matvey-Kuk Matvey-Kuk closed this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🔌 Provider] Make PagerDuty provider to fetch incidents retrospectively
5 participants