-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Improve the Slack notification action #57
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a1399f9
feat(run-integration-test): Add health output
Techassi 4fe5ddf
feat(send-slack-notification): Add type, test-result, and test-health…
Techassi 9853259
feat(send-slack-notification): Validate inputs
Techassi 80f5c13
fix(run-integration-test): Fix echo commands
Techassi df827ec
feat(run-integration-tests): Add failed-tests output
Techassi ea9b9de
refactor(run-integration-test): Change health output format
Techassi 85abbb9
refactor(send-slack-notification): Use templates for messages
Techassi f9d4b49
ci: Update smoke workflow
Techassi 301c33c
ci: Add checkout step to notify job
Techassi b6ea07b
ci(smoke): Add notification type
Techassi e5b787a
fix(send-slack-notification): Use proper if statement to check vars
Techassi 1851494
chore(send-slack-notification): Use multiline pipe
Techassi a8b4c69
fix(send-slack-notification): Template payload
Techassi 9a17cbb
temp: Just run the notify job
Techassi 715dfd8
fix(send-slack-notification): Make MESSAGE_VERB var available
Techassi f92ac32
chore(send-slack-notification): Remove trailing space
Techassi 5323176
fix(send-slack-notification): Indicate multiline content with EOF
Techassi c08dd57
fix(send-slack-notification): Only use available contexts in templates
Techassi f9a51e7
Revert "temp: Just run the notify job"
Techassi be49f29
fix(run-integration-test): Use single quotes in condition
Techassi fc62964
fix(run-integration-test): Use correct var, fix health calculation
Techassi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| send-slack-notification/templates/* linguist-language=yaml |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| Calculate the percentage of successes of the last few tries (usually 5) and | ||
| return emojis suited for Slack and Github and the rate of successes formatted | ||
| like <successes>/<total_tries>. | ||
| */ | ||
|
|
||
| /* Set the scale to 1 to get 1 digit after the decimal point */ | ||
| scale = 1 | ||
|
|
||
| /* Calculate the percentage of successes */ | ||
| /* The variables below are replaced by envsubst */ | ||
| total_tries = ${LAST_TRIES_TOTAL}+1 | ||
| successes = ${SUCCESSES} | ||
| health = successes/total_tries | ||
|
|
||
| /* Convert the percentage into "weather" icons */ | ||
| if (health > 0.8) { | ||
| print ":sunny:,:sunny:,", successes, "/", total_tries | ||
| } else { | ||
| if (health > 0.6) { | ||
| print ":partly_sunny:,:partly_sunny:,", successes, "/", total_tries | ||
| } else { | ||
| if (health > 0.4) { | ||
| print ":cloud:,:cloud:,", successes, "/", total_tries | ||
| } else { | ||
| if (health > 0.2) { | ||
| print ":rain_cloud:,:cloud_with_rain:,", successes, "/", total_tries | ||
| } else { | ||
| print ":thunder_cloud_and_rain:,:cloud_with_lightning_and_rain:,", successes, "/", total_tries | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| quit |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.