Skip to content

Commit

Permalink
[MegaLinter] Apply linters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wesley-dean-gsa authored and megalinter-bot committed Aug 22, 2024
1 parent 87bd87d commit dbd3d2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/has_newer_commits.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ compare_dates() {
fetch_data "$(build_url "$a")"
fetch_data "$(build_url "$b")"
} | jq \
--raw-output \
--slurp \
'if .[0].commit.commit.author.date < .[1].commit.commit.author.date then true else false end'
--raw-output \
--slurp \
'if .[0].commit.commit.author.date < .[1].commit.commit.author.date then true else false end'
}

build_url() {
Expand All @@ -31,7 +31,7 @@ build_url() {
repo="${item%%@*}"
branch="${item##*@}"

if [ "$branch" == "$repo" ] ; then
if [ "$branch" == "$repo" ]; then
repo="$item"
branch="main"
fi
Expand All @@ -42,7 +42,7 @@ build_url() {
a="${1?Error: two owner/repo@branch values must be provided (0 were)}"
b="${2?Error: two owner/repo@branch values must be provided (1 was)}"

if [ "$(compare_dates "$a" "$b")" == "true" ] ; then
if [ "$(compare_dates "$a" "$b")" == "true" ]; then
exit 0
else
exit 1
Expand Down

0 comments on commit dbd3d2b

Please sign in to comment.