-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bdad52
commit 0d52212
Showing
1 changed file
with
9 additions
and
6 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 |
---|---|---|
|
@@ -149,19 +149,21 @@ jobs: | |
ORS = ""; | ||
} | ||
NR==FNR { | ||
prev_pkgs[$1] = $0; | ||
# Process the previous section | ||
split($0, parts, "- "); | ||
prev_pkgs[parts[1]] = $0; | ||
next; | ||
} | ||
{ | ||
pkg_name = $1; | ||
current_line = $0; | ||
# Process the current section | ||
split($0, parts, "- "); | ||
pkg_name = parts[1]; | ||
if (pkg_name in prev_pkgs) { | ||
old_line = prev_pkgs[pkg_name]; | ||
delete prev_pkgs[pkg_name]; | ||
if (old_line != current_line) { | ||
if (old_line != $0) { | ||
split(old_line, old_parts, "- "); | ||
split(current_line, new_parts, "- "); | ||
printf "%s: %s -> %s\n", pkg_name, old_parts[1], new_parts[1]; | ||
printf "%s: %s -> %s\n", parts[2], old_parts[1], parts[1]; | ||
} | ||
} | ||
} | ||
|
@@ -183,6 +185,7 @@ jobs: | |
echo -e "$FORMATTED_DIFF" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Send Slack Notification | ||
# if: ${{ github.ref == 'refs/heads/master' && env.DIFF_OUTPUT != '' }} | ||
uses: slackapi/[email protected] | ||
|