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(service): PagerDuty service integration #933

Merged
merged 7 commits into from
Jan 15, 2025
Merged

Conversation

tecnologer
Copy link
Contributor

@tecnologer tecnologer commented Jan 10, 2025

Description

PagerDuty integration as a notify service.

Motivation and Context

We implemented it for internal usage at DefectDojo and decided to contribute to the community.

How Has This Been Tested?

Unit tests for exported methods, test mock the client, and a proof of concept in a separate test project.

Screenshots / Output (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Owner

@nikoksr nikoksr left a comment

Choose a reason for hiding this comment

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

Hi @tecnologer, thank you for your PR, impressive stuff!

Minimal nitpicks really. Ready to merge once you fixed those.

I think

golangci-lint run --fix ./service/pagerduty

should automatically do most of the work for you by fixing almost all linter complaints.

Cheers :)

service/pagerduty/pager_duty.go Outdated Show resolved Hide resolved
@tecnologer
Copy link
Contributor Author

done, linter's complaints fixed

@tecnologer tecnologer requested a review from nikoksr January 13, 2025 18:46
Copy link
Owner

@nikoksr nikoksr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.69%. Comparing base (8efdc15) to head (dcabd2b).
Report is 88 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #933       +/-   ##
===========================================
- Coverage   74.10%   31.69%   -42.42%     
===========================================
  Files          44       63       +19     
  Lines        1572     2726     +1154     
===========================================
- Hits         1165      864      -301     
- Misses        307     1741     +1434     
- Partials      100      121       +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nikoksr
Copy link
Owner

nikoksr commented Jan 14, 2025

@tecnologer Hm, looks like the linter is still failing. I checked locally and

golangci-lint run --fix ./service/pagerduty

removes the two problematic comments no problem.

@tecnologer tecnologer requested a review from nikoksr January 14, 2025 15:44
@nikoksr
Copy link
Owner

nikoksr commented Jan 15, 2025

@tecnologer merging! Thanks for your contribution again :)

@nikoksr nikoksr merged commit be564db into nikoksr:main Jan 15, 2025
6 of 7 checks passed
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