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

feat(examples): add full example for hubspot ticket create #14

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Changes from all commits
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
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