Skip to content

Commit d13188c

Browse files
authored
misc: skip for sync PRs, remove issue opened check for pr validator (#6244)
* fix: skip for sync PRs, remove issue opened check for pr validator * misc: retained old code and commented them instead deleting
1 parent 36e484f commit d13188c

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

.github/semantic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ types:
1111
- doc
1212
- release
1313
- misc
14+
- sync

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
5454
set -x
5555
# Skip validation for documentation or chore PRs
56-
if [[ "$TITLE" =~ ^(doc:|docs:|chore:|misc:|Release:|release:) ]]; then
56+
if [[ "$TITLE" =~ ^(doc:|docs:|chore:|misc:|Release:|release:|Sync:|sync:) ]]; then
5757
echo "Skipping validation for docs/chore PR."
5858
echo "PR NUMBER-: $PRNUM "
5959
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"
@@ -140,32 +140,33 @@ jobs:
140140
--header "authorization: Bearer ${{ secrets.GH_PR_VALIDATOR_TOKEN }}" \
141141
"$issue_api_url"| jq '.state'|tr -d \")
142142
fi
143-
echo "Issue Status: $issue_status"
144-
143+
echo "Issue Number : $issue_num Status: $issue_status"
145144
# Check if the issue is still open.
146-
if [[ "$issue_status" == open ]]; then
147-
echo "Issue #$issue_num is opened."
145+
# if [[ "$issue_status" == open ]]; then
146+
# echo "Issue #$issue_num is opened."
148147
if [[ $forked == true ]]; then
149148
echo "PR:Ready-to-Review, exiting gracefully"
150149
exit 0
151150
fi
152151
# Remove the 'Issue-verification-failed' label (if present) and add 'Ready-to-Review'.
153152
gh pr edit $PRNUM --remove-label "PR:Issue-verification-failed"
154153
gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
155-
else
156-
echo "Issue #$issue_num is closed. Please link an open issue to proceed."
157-
if [[ $forked == true ]]; then
158-
echo "PR:Ready-to-Review, exiting gracefully"
159-
exit 0
160-
fi
154+
echo "PR:Ready-to-Review, exiting gracefully"
155+
exit 0
156+
# else
157+
# echo "Issue #$issue_num is closed. Please link an open issue to proceed."
158+
# if [[ $forked == true ]]; then
159+
# echo "PR:Ready-to-Review, exiting gracefully"
160+
# exit 0
161+
# fi
161162
# Add a comment to the PR indicating the issue is not linked correctly.
162-
gh pr comment $PRNUM --body "PR is linked to a closed issue. Please link an open issue to proceed."
163+
# gh pr comment $PRNUM --body "PR is linked to a closed issue. Please link an open issue to proceed."
163164

164165
# Add the 'Issue-verification-failed' label and remove 'Ready-to-Review'.
165-
gh pr edit $PRNUM --add-label "PR:Issue-verification-failed"
166-
gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
167-
exit 1
168-
fi
166+
# gh pr edit $PRNUM --add-label "PR:Issue-verification-failed"
167+
# gh pr edit $PRNUM --remove-label "PR:Ready-to-Review"
168+
# exit 1
169+
#fi
169170
else
170171
echo "Issue not found. Invalid URL or issue number."
171172
# Add a comment to the PR indicating the issue is not linked correctly.

0 commit comments

Comments
 (0)