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

[Integration][PagerDuty] PORT-10680 Added default action to PagerDuty #1075

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions integrations/pagerduty/.port/resources/actions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[
{
"identifier": "trigger_incident",
"title": "Trigger incident",
"icon": "pagerduty",
"description": "Trigger a page in PagerDuty that will alert the on-call to an issue",
"trigger": {
"type": "self-service",
"operation": "DAY-2",
"userInputs": {
"properties": {
"title": {
"type": "string",
"title": "Title",
"description": "Title of the incident"
},
"description": {
"type": "string",
"title": "Description",
"description": "Description of the incident"
}
},
"required": [],
"order": [
"title"
]
},
"blueprintIdentifier": "pagerdutyService"
},
"invocationMethod": {
"type": "WEBHOOK",
"url": "https://api.pagerduty.com/incidents",
"agent": false,
"synchronized": true,
"method": "POST",
"headers": {
"RUN_ID": "{{ .run.id }}",
"Authorization": "Token token={{ .secrets.PAGERDUTY_API_TOKEN }}",
Copy link
Contributor

Choose a reason for hiding this comment

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

let's have a unified secret naming using secrets.variable_name. I see we have different format for the snyk and jira

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

"Accept": "application/vnd.pagerduty+json;version=2",
"Content-Type": "application/json",
"From": "{{ .trigger.by.user.email }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

is the From part of the acceptable PagerDuty header properties? I'm curious if this is to show who the sender of the incident is from the PagerDuty dashboard

},
"body": {
"incident": {
"type": "incident",
"title": "{{ .inputs.title }}",
"service": {
"id": "{{ .entity.identifier }}",
"type": "service_reference"
},
"urgency": "high",
"body": {
"type": "incident_body",
"details": "{{ .inputs.description }}"
}
}
}
},
"requiredApproval": false
}
]
8 changes: 8 additions & 0 deletions integrations/pagerduty/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- towncrier release notes start -->

## 0.1.108 (2024-10-10)


### Improvements

- Added a default Port self service action to allow users to trigger a pagerduty incident alert to on-call users about an issue


## 0.1.107 (2024-10-09)


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.107"
version = "0.1.108"
description = "Pagerduty Integration"
authors = ["Port Team <support@getport.io>"]

Expand Down