Skip to content

Commit

Permalink
fix(opsgenie): changed 'escalation' jq mapping for property 'repeat' …
Browse files Browse the repository at this point in the history
…to supported version
  • Loading branch information
DeXtroTip committed Nov 20, 2024
1 parent 22ab800 commit 99c5d46
Showing 1 changed file with 79 additions and 79 deletions.
158 changes: 79 additions & 79 deletions galaxy/integrations/opsgenie/.rely/mappings.yaml
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
resources:
- kind: team
mappings:
id: .id
title: .name
blueprintId: '"opsgenie.v1.team"'
description: .description
properties:
webUrl: .links.web
apiUrl: .links.api
onCallSchedules: '[.schedules[] | select(.enabled == true) | .name]'
- kind: team
mappings:
id: .id
title: .name
blueprintId: '"opsgenie.v1.team"'
description: .description
properties:
webUrl: .links.web
apiUrl: .links.api
onCallSchedules: "[.schedules[] | select(.enabled == true) | .name]"

- kind: service
mappings:
id: .id
title: .name
blueprintId: '"opsgenie.v1.service"'
description: .description
properties:
webUrl: '.context.baseUrl + "/service/" + .id'
isExternal: .isExternal
relations:
team:
value: .teamId
- kind: service
mappings:
id: .id
title: .name
blueprintId: '"opsgenie.v1.service"'
description: .description
properties:
webUrl: '.context.baseUrl + "/service/" + .id'
isExternal: .isExternal
relations:
team:
value: .teamId

- kind: user
mappings:
id: .id
title: .fullName
blueprintId: '"opsgenie.v1.user"'
description: '""'
properties:
username: .username
role: .role.name
timeZone: .timeZone
locale: .locale
blocked: .blocked
verified: .verified
createdAt: .createdAt
webUrl: '.context.baseUrl + "/settings/users/" + .id + "/detail"'
onCallDashboard: '.context.baseUrl + "/settings/users/" + .id + "/onCallSchedule"'
currentlyOnCall: '(.teamsOnCall | length > 0)'
nextOnCallStart: .nextOnCallShift.startDate
nextOnCallEnd: .nextOnCallShift.endDate
relations:
teams:
value: '[.teams[].id]'
currentlyOnCallFor:
value: .teamsOnCall
nextOnCallFor:
value: .nextOnCallShift.teamId
- kind: user
mappings:
id: .id
title: .fullName
blueprintId: '"opsgenie.v1.user"'
description: '""'
properties:
username: .username
role: .role.name
timeZone: .timeZone
locale: .locale
blocked: .blocked
verified: .verified
createdAt: .createdAt
webUrl: '.context.baseUrl + "/settings/users/" + .id + "/detail"'
onCallDashboard: '.context.baseUrl + "/settings/users/" + .id + "/onCallSchedule"'
currentlyOnCall: "(.teamsOnCall | length > 0)"
nextOnCallStart: .nextOnCallShift.startDate
nextOnCallEnd: .nextOnCallShift.endDate
relations:
teams:
value: "[.teams[].id]"
currentlyOnCallFor:
value: .teamsOnCall
nextOnCallFor:
value: .nextOnCallShift.teamId

- kind: escalation
mappings:
id: .id
title: .name
blueprintId: '"opsgenie.v1.escalation"'
description: .description
properties:
rules: .rules | tostring
repeat: select(.repeat != null) | tostring // null
relations:
team:
value: .ownerTeam.id
- kind: escalation
mappings:
id: .id
title: .name
blueprintId: '"opsgenie.v1.escalation"'
description: .description
properties:
rules: .rules | tostring
repeat: if .repeat == null then null else .repeat | tostring end
relations:
team:
value: .ownerTeam.id

- kind: incident
mappings:
id: .id
title: .message
blueprintId: '"opsgenie.v1.incident"'
description: .description
properties:
tinyId: .tinyId
status: .status
createdAt: .createdAt
updatedAt: .updatedAt
closedAt: .impactEndDate
priority: .priority
webUrl: '.context.baseUrl + "/incident/detail/" + .id'
relations:
impactedServices:
value: .impactedServices
responders:
value: '[.responders[] | select(.type == "team") | .id]'
- kind: incident
mappings:
id: .id
title: .message
blueprintId: '"opsgenie.v1.incident"'
description: .description
properties:
tinyId: .tinyId
status: .status
createdAt: .createdAt
updatedAt: .updatedAt
closedAt: .impactEndDate
priority: .priority
webUrl: '.context.baseUrl + "/incident/detail/" + .id'
relations:
impactedServices:
value: .impactedServices
responders:
value: '[.responders[] | select(.type == "team") | .id]'

0 comments on commit 99c5d46

Please sign in to comment.