-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👽 chore: Update workflows outputs to match github's new standard (#5)
# Description Changed the `set-output` command to use `$GITHUB_OUTPUT` in accordance with [this article](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) Added workflow output using the `$GITHUB_STEP_SUMMARY` file for precommit ## Type of change :bug: Bug fix (non-breaking change which fixes an issue) :sparkles: New feature (non-breaking change which adds functionality) # Checklist: - [X] My code follows the style guidelines of this project - [X] I have performed a self-review of my own code - [X] I have made corresponding changes to the documentation - [X] My changes generate no new warnings - [X] I have added tests that prove my fix is effective or that my feature works - [X] New and existing unit tests pass locally with my changes - [X] Any dependent changes have been merged and published in downstream modules
- Loading branch information
Showing
6 changed files
with
97 additions
and
28 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
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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
output=$(cat ./test/pre_commit_output.txt) | ||
output=$(echo "$output" | grep -v '\[INFO\]') | ||
output=$(echo "$output" | sed 's/Passed/:white_check_mark:/g') | ||
output=$(echo "$output" | sed 's/Skipped/:ballot_box_with_check:/g') | ||
output=$(echo "$output" | sed 's/Failed/:x:/g') | ||
|
||
# Exclude empty lines | ||
output=$(echo "$output" | grep -v '^$') | ||
|
||
# Exclude lines that start with '-' | ||
output=$(echo "$output" | grep -v '^-') | ||
|
||
# Exclude lines that start with 'Fixing' | ||
output=$(echo "$output" | grep -v '^Fixing') | ||
|
||
# Use awk to format the output into a markdown table, removing the dots | ||
output=$(echo "$output" | awk -F':' '{gsub(/\.+/, "", $1); print "| " $1 " | :" $2 ":|"}') | ||
|
||
echo "| Check | Result |" > ./test/pre_commit_output.md | ||
echo "| --- | --- |" >> ./test/pre_commit_output.md | ||
echo "$output" >> ./test/pre_commit_output.md |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
| Check | Result | | ||
| --- | --- | | ||
| check for merge conflicts | :white_check_mark:| | ||
| don't commit to branch | :white_check_mark:| | ||
| Update markdown table of contents | :white_check_mark:| | ||
| Detect secrets | :white_check_mark:| | ||
| trim trailing whitespace | :white_check_mark:| | ||
| fix end of files | :white_check_mark:| | ||
| check json(no files to check) | :ballot_box_with_check:| | ||
| check yaml | :white_check_mark:| | ||
| validate pre-commit manifest(no files to check) | :ballot_box_with_check:| | ||
| Pretty format YAML | :white_check_mark:| | ||
| check for added large files | :white_check_mark:| | ||
| check for added large files with git lfs | :x:| | ||
| Fixing test/pre_commit_outputtxt | ::| | ||
| check for added large files with git lfs | :white_check_mark:| |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
check for merge conflicts................................................Passed | ||
don't commit to branch...................................................Passed | ||
Update markdown table of contents........................................Passed | ||
Detect secrets...........................................................Passed | ||
trim trailing whitespace.................................................Passed | ||
fix end of files.........................................................Passed | ||
check json...........................................(no files to check)Skipped | ||
check yaml...............................................................Passed | ||
validate pre-commit manifest.........................(no files to check)Skipped | ||
Pretty format YAML.......................................................Passed | ||
check for added large files..............................................Passed | ||
check for added large files with git lfs.................................Failed | ||
- hook id: check-added-large-files-with-git-lfs | ||
- exit code: 1 | ||
- files were modified by this hook | ||
|
||
Fixing test/pre_commit_output.txt | ||
|
||
check for added large files with git lfs.................................Passed |