Skip to content

Commit af1ab42

Browse files
committed
Simplify unix epoch conversion
jq supports it too, no need to call date
1 parent e13f399 commit af1ab42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/retire.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ for login in *; do
124124
if [[ -n "$prInfo" ]]; then
125125
# If there is a PR already
126126
prNumber=$(jq .number <<< "$prInfo")
127-
epochCreatedAt=$(date --date="$(jq -r .created_at <<< "$prInfo")" +%s)
127+
epochCreatedAt=$(jq '.created_at | fromdateiso8601' <<< "$prInfo")
128128
if jq -e .draft <<< "$prInfo" >/dev/null && (( epochCreatedAt < noticeCutoff )); then
129129
log "$login has a retirement PR due, unmarking PR as draft and commenting with next steps"
130130
effect gh pr ready --repo "$ORG/$MEMBER_REPO" "$prNumber"

0 commit comments

Comments
 (0)