Skip to content

Commit

Permalink
[Integration][PagerDuty] - Updated the service blueprint from string …
Browse files Browse the repository at this point in the history
…to enum (#380)

# Description

What - Updated the service blueprint from string to enum, and changed
the incident responder property from string to user
Why -
How - Used service `status` enum values as defined in [Pagerduty service
schema](https://developer.pagerduty.com/api-reference/e960cca205c0f-list-services)

## Type of change

- [ ] Non-breaking change (fix of existing functionality that will not
change current behavior)

---------

Co-authored-by: Yair Siman Tov <[email protected]>
  • Loading branch information
PeyGis and yairsimantov20 authored Mar 19, 2024
1 parent 089f25e commit cdc6674
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
19 changes: 17 additions & 2 deletions integrations/pagerduty/.port/resources/blueprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@
"properties": {
"status": {
"title": "Status",
"type": "string"
"type": "string",
"enum": [
"active",
"warning",
"critical",
"maintenance",
"disabled"
],
"enumColors": {
"active": "green",
"warning": "yellow",
"critical": "red",
"maintenance": "lightGray",
"disabled": "darkGray"
}
},
"url": {
"title": "URL",
Expand Down Expand Up @@ -77,7 +91,8 @@
},
"responder": {
"type": "string",
"title": "Assignee"
"title": "Assignee",
"format": "user"
},
"escalation_policy": {
"type": "string",
Expand Down
3 changes: 2 additions & 1 deletion integrations/pagerduty/.port/resources/port-app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ resources:
- kind: incidents
selector:
query: 'true'
include: ['assignees']
port:
entity:
mappings:
Expand All @@ -30,7 +31,7 @@ resources:
status: .status
url: .self
urgency: .urgency
responder: .assignments[0].assignee.summary
responder: .assignments[0].assignee.email
escalation_policy: .escalation_policy.summary
created_at: .created_at
updated_at: .updated_at
Expand Down
7 changes: 7 additions & 0 deletions integrations/pagerduty/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

# Port_Ocean 0.1.44 (2024-03-19)

### Improvements

- Updated the format for properties in the default blueprints


# Port_Ocean 0.1.43 (2024-03-17)

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion integrations/pagerduty/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pagerduty"
version = "0.1.43"
version = "0.1.44"
description = "Pagerduty Integration"
authors = ["Port Team <[email protected]>"]

Expand Down

0 comments on commit cdc6674

Please sign in to comment.