From 602b806685e7e3e9a2a7bdbfd9b633fb5f61c723 Mon Sep 17 00:00:00 2001 From: Shardul Vaidya Date: Mon, 2 Oct 2023 14:12:50 -0400 Subject: [PATCH] Fixed the exponential revert errors --- .github/workflows/close-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-pull-request.yaml b/.github/workflows/close-pull-request.yaml index 3a144125..af7b9f38 100644 --- a/.github/workflows/close-pull-request.yaml +++ b/.github/workflows/close-pull-request.yaml @@ -17,14 +17,14 @@ jobs: run: | # Get Commits from this PR TAG=PR_${{ github.event.pull_request.number }} - commits=$(git rev-list HEAD --grep=$TAG) + commits=$(git rev-list HEAD --grep=153 --max-count=1) echo "commits: $commits" # Revert Commits or Log that no change was made git config --local user.email "dev@null" git config --local user.name "Conformitron Bot" - git revert ${commit[0]} --no-edit || echo "Commit ${commit[0]} not reverted" + git revert $commits --no-edit || echo "Commit ${commit[0]} not reverted" # for commit in $commits; do # echo $commit