-
Notifications
You must be signed in to change notification settings - Fork 783
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(api): support source in enrichments
- Loading branch information
Showing
2 changed files
with
45 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
# Alert when there are new GitHub Stars utilizing keepstate | ||
workflow: | ||
id: new-github-stars | ||
description: Notify Slack about new GitHub star for keephq/keep | ||
triggers: | ||
- type: interval | ||
value: 300 | ||
steps: | ||
- name: get-github-stars | ||
provider: | ||
type: github.stars | ||
config: "{{ providers.github }}" | ||
with: | ||
repository: "keephq/keep" | ||
previous_stars_count: | ||
key: "{{ state.new-github-stars.-1.workflow_context.steps_context.get-github-stars.results.stars }}" | ||
default: 0 | ||
actions: | ||
- name: trigger-slack | ||
condition: | ||
- name: assert-condition | ||
id: new-github-stars | ||
description: Notify Slack about new GitHub star for keephq/keep | ||
triggers: | ||
- type: manual | ||
- type: interval | ||
value: 300 | ||
steps: | ||
- name: get-github-stars | ||
provider: | ||
config: "{{ providers.github }}" | ||
type: github.stars | ||
with: | ||
previous_stars_count: | ||
default: 0 | ||
key: "{{ last_workflow_results.get-github-stars.0.stars }}" | ||
repository: keephq/keep | ||
actions: | ||
- condition: | ||
- assert: "{{ steps.get-github-stars.results.new_stargazers_count }} > 0" | ||
name: assert-condition | ||
type: assert | ||
assert: "{{ steps.get-github-stars.results.new_stargazers_count }} > 0" # if there are more than 0 new stargazers, trigger the action | ||
provider: | ||
type: slack | ||
config: " {{ providers.slack-demo }} " | ||
with: | ||
blocks: | ||
- type: section | ||
text: | ||
type: plain_text | ||
text: There are new keep.len({{ steps.get-github-stars.results.new_stargazers }}) stargazers for keephq/keep | ||
emoji: true | ||
- type: section | ||
text: | ||
type: plain_text | ||
text: |- | ||
{{#steps.get-github-stars.results.new_stargazers}} | ||
- {{username}} at {{starred_at}} | ||
{{/steps.get-github-stars.results.new_stargazers}} | ||
emoji: true | ||
name: trigger-slack | ||
provider: | ||
config: "{{ providers.slack-demo }}" | ||
type: slack | ||
with: | ||
blocks: | ||
- text: | ||
emoji: true | ||
text: There are new keep.len({{ steps.get-github-stars.results.new_stargazers}}) stargazers for keephq/keep | ||
type: plain_text | ||
type: section | ||
- text: | ||
emoji: true | ||
text: "{{#steps.get-github-stars.results.new_stargazers}} | ||
- {{username}} at {{starred_at}} | ||
{{/steps.get-github-stars.results.new_stargazers}}" | ||
type: plain_text | ||
type: section | ||
channel: "C06N0KXXXX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters