Skip to content

Commit 81f04a5

Browse files
committed
chore: remove close prs logic for create wrappers workflow
1 parent 705b69e commit 81f04a5

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

.github/workflows/create-wrapper-prs.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
bun-version: latest
8787
- run: bun i -g semver
8888

89-
- name: Get latest SDK releases and close existing PRs
89+
- name: Get latest SDK releases
9090
id: versions
9191
run: |
9292
# Define SDK to repo mapping
@@ -104,31 +104,6 @@ jobs:
104104
LATEST_VERSION=$(gh release list --repo "$REPO" --limit 20 --json tagName,isPrerelease | jq -r '.[] | select(.isPrerelease == false) | .tagName' | head -1 || echo "")
105105
NEW_VERSION=$(semver "$LATEST_VERSION" -i patch)
106106
echo "$SDK=$NEW_VERSION" >> $GITHUB_OUTPUT
107-
108-
# Close existing PR for this exact version if it exists (unless it has protected labels)
109-
RELEASE_BRANCH="rel/$NEW_VERSION"
110-
PR_INFO=$(gh pr list \
111-
--repo "$REPO" \
112-
--head "$RELEASE_BRANCH" \
113-
--state open \
114-
--json number,labels -q '.[0]')
115-
116-
if [ -n "$PR_INFO" ] && [ "$PR_INFO" != "null" ]; then
117-
PR_NUMBER=$(echo "$PR_INFO" | jq -r '.number')
118-
PROTECTED_LABELS="do-not-close,in-review,blocked"
119-
HAS_PROTECTED_LABEL=$(echo "$PR_INFO" | jq -r --arg labels "$PROTECTED_LABELS" '.labels[].name | select(. as $l | $labels | split(",") | index($l))')
120-
121-
if [ -n "$HAS_PROTECTED_LABEL" ]; then
122-
echo "⚠️ Skipping close of $SDK PR #$PR_NUMBER (has protected label: $HAS_PROTECTED_LABEL)"
123-
else
124-
# Attempt to close PR, but don't fail if permission denied
125-
if gh pr close "$PR_NUMBER" --repo "$REPO" 2>&1; then
126-
echo "ℹ️ Closed $SDK PR #$PR_NUMBER for branch $RELEASE_BRANCH"
127-
else
128-
echo "⚠️ Warning: Could not close $SDK PR #$PR_NUMBER (may lack permissions)"
129-
fi
130-
fi
131-
fi
132107
done
133108
env:
134109
GH_TOKEN: ${{ secrets.GH_PUSH_TOKEN || github.token }}

0 commit comments

Comments
 (0)