Skip to content

Commit

Permalink
Merge pull request #14 from shrutimantri/add-full-examples-1
Browse files Browse the repository at this point in the history
feat(examples): add full example for hubspot ticket create
  • Loading branch information
anna-geller committed Sep 21, 2024
2 parents deda0bc + 0da8174 commit 6946043
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/main/java/io/kestra/plugin/hubspot/tickets/Create.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@
id: hubspot_tickets_create
namespace: company.team
tasks:
- id: create_ticket
type: io.kestra.plugin.hubspot.tickets.Create
apiKey: my_api_key
subject: "Increased 5xx in Demo Service"
content: "The number of 5xx has increased beyond the threshold for Demo service."
stage: 3
priority: HIGH
"""
),
@Example(
title = "Create an issue when a Kestra workflow in any namespace with `company` as prefix fails.",
full = true,
code = """
id: create_ticket_on_failure
namespace: system
tasks:
- id: create_ticket
type: io.kestra.plugin.hubspot.tickets.Create
Expand All @@ -36,6 +53,18 @@
content: "{{ execution.id }} has failed on {{ taskrun.startDate }}"
stage: 3
priority: HIGH
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatusCondition
in:
- FAILED
- WARNING
- type: io.kestra.plugin.core.condition.ExecutionNamespaceCondition
namespace: company
comparison: PREFIX
"""
)
}
Expand Down

0 comments on commit 6946043

Please sign in to comment.