Skip to content

Commit 99226b4

Browse files
Badal Kumar PrustyBadal Kumar Prusty
authored andcommitted
Refactored after review-3
1 parent 69ed7b5 commit 99226b4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/pr-issue-validator.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ jobs:
5959
# Check if PR_BODY matches the provided pattern using Bash's =~ regex operator
6060
if [[ "$PR_BODY" =~ $pattern ]]; then
6161
echo "matched for this pattern $pattern"
62-
63-
# # If there is a match, Bash populates the BASH_REMATCH array with the results. stores the entire matched portion of the string
64-
# issue_num=$(echo "${BASH_REMATCH[0]}" | grep -oE "[0-9]+" | tr -d '\r\n')
6562

6663
issue_num=$(echo "$PR_BODY" | grep -oE "$pattern" | grep -oE "[0-9]+")
6764

@@ -107,7 +104,7 @@ jobs:
107104
--header "authorization: Bearer ${{ secrets.GH_PR_VALIDATOR_TOKEN }}" \
108105
"$issue_api_url" | jq '.state'|tr -d \")
109106
# Check if the issue is still open.
110-
if [[ "$issue_status" -eq open ]]; then
107+
if [[ "$issue_status" == open ]]; then
111108
echo "Issue #$issue_num is opened."
112109
# Remove the 'Issue-verification-failed' label (if present) and add 'Ready-to-Review'.
113110
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"

0 commit comments

Comments
 (0)