@@ -36,37 +36,27 @@ jobs:
3636 echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
3737 echo "Current upstream version: $CURRENT"
3838
39- - name : Check for newer VS Code release branches
39+ - name : Check for next VS Code release branch
4040 id : check
4141 run : |
4242 CURRENT="${{ steps.current.outputs.version }}"
4343 CURRENT_MINOR=$(echo "$CURRENT" | grep -oP '\d+\.\d+' | cut -d. -f2)
44- echo "Current minor version: $CURRENT_MINOR"
45-
46- LATEST_MINOR="$CURRENT_MINOR"
47- LATEST_BRANCH=""
48-
49- for i in $(seq 1 10); do
50- CHECK_MINOR=$((CURRENT_MINOR + i))
51- BRANCH="release/1.${CHECK_MINOR}"
52- if git ls-remote --heads https://github.com/microsoft/vscode.git "$BRANCH" | grep -q "$BRANCH"; then
53- echo "Found branch: $BRANCH"
54- LATEST_MINOR="$CHECK_MINOR"
55- LATEST_BRANCH="$BRANCH"
56- else
57- break
58- fi
59- done
60-
61- if [ -n "$LATEST_BRANCH" ]; then
44+ NEXT_MINOR=$((CURRENT_MINOR + 1))
45+ BRANCH="release/1.${NEXT_MINOR}"
46+ echo "Current minor: $CURRENT_MINOR, checking next: $BRANCH"
47+
48+ if git ls-remote --heads https://github.com/microsoft/vscode.git "$BRANCH" | grep -q "$BRANCH"; then
6249 echo "new_release=true" >> "$GITHUB_OUTPUT"
63- echo "latest_branch=$LATEST_BRANCH " >> "$GITHUB_OUTPUT"
64- echo "New release branch found: $LATEST_BRANCH "
50+ echo "next_branch=$BRANCH " >> "$GITHUB_OUTPUT"
51+ echo "Next release branch found: $BRANCH "
6552 else
6653 echo "new_release=false" >> "$GITHUB_OUTPUT"
67- echo "No new release branch found"
54+ echo "No next release branch found"
6855 fi
6956
57+ # Only check open issues so closed ones don't block new issue creation.
58+ # TODO: once the automation pipeline is stable, consider also checking
59+ # closed issues to avoid duplicates for the same version.
7060 - name : Check if issue already exists
7161 if : steps.check.outputs.new_release == 'true'
7262 id : existing
8272
8373 if [ "$EXISTING" -gt 0 ]; then
8474 echo "exists=true" >> "$GITHUB_OUTPUT"
85- echo "An alignment issue already exists, skipping creation"
75+ echo "An open alignment issue already exists, skipping creation"
8676 else
8777 echo "exists=false" >> "$GITHUB_OUTPUT"
8878 fi
9181 if : steps.check.outputs.new_release == 'true' && steps.existing.outputs.exists == 'false'
9282 env :
9383 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94- LATEST_BRANCH : ${{ steps.check.outputs.latest_branch }}
84+ NEXT_BRANCH : ${{ steps.check.outputs.next_branch }}
9585 run : |
96- VERSION=$(echo "$LATEST_BRANCH " | sed 's|release/||')
86+ VERSION=$(echo "$NEXT_BRANCH " | sed 's|release/||')
9787
9888 cat > /tmp/issue-body.md <<EOF
9989 ### Is your task related to a problem? Please describe
0 commit comments