diff --git a/.github/workflows/update-integration-tests.yml b/.github/workflows/update-integration-tests.yml index 68a4168..d39be9b 100644 --- a/.github/workflows/update-integration-tests.yml +++ b/.github/workflows/update-integration-tests.yml @@ -12,9 +12,6 @@ jobs: update-snapshots: if: > ( - github.event.issue.author_association == 'OWNER' || - github.event.issue.author_association == 'COLLABORATOR' || - github.event.issue.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' @@ -43,9 +40,9 @@ jobs: run: | pr="$(gh api /repos/${GH_REPO}/pulls/${PR_NUMBER})" head_sha="$(echo "$pr" | jq -r .head.sha)" - pushed_at="$(echo "$pr" | jq -r .pushed_at)" + pushed_at="$(echo "$pr" | jq -r .head.repo.pushed_at)" - if [[ $(date -d "$pushed_at" +%s) -gt $(date -d "$COMMENT_AT" +%s) ]]; then + if [[ $(date -d "$pushed_at" +%s) -ge $(date -d "$COMMENT_AT" +%s) ]]; then echo "Updating is not allowed because the PR was pushed to (at $pushed_at) after the triggering comment was issued (at $COMMENT_AT)" exit 1 fi