-
Notifications
You must be signed in to change notification settings - Fork 70
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
Adding ability to automatically close incident in PagerDuty #486
base: master
Are you sure you want to change the base?
Changes from all commits
2ab9493
0a94442
c1beff2
3a539dd
7c230df
a6bba55
086e388
093c90d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ func TestBuildEvent(t *testing.T) { | |
baseExpected := pagerduty.V2Event{ | ||
RoutingKey: contact.Value, | ||
Action: "trigger", | ||
DedupKey: "TriggerID", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to see more complex example of switching states between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @litleleprikon Sorry but i can't imagine wthat you want:-), can you clarify? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not about the
In two last cases the action will be |
||
Payload: &pagerduty.V2Payload{ | ||
Summary: "NODATA Trigger Name [tag1][tag2]", | ||
Severity: "warning", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May we move this string literals to constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I doesn't understand, why this needed? In official library which you use (https://github.com/PagerDuty/go-pagerduty), those doesn't defined as constants, so it's very strange to invent abstractions if the authors of official library did not provide them themselves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just do not like string literals and magic numbers placed in random places in the code. The reason to place this values in constants is that it will be easier to change values in one place if pagerduty will change their API. I know that right now this values are placed only in two places but in future we can have more complex condition of action choose.