@@ -98,12 +98,22 @@ jobs:
9898 VERSION_NUMBER : ${{ github.event.inputs.version_number }}
9999 working-directory : ./local_kernel
100100 run : |
101+ echo "=== Git log (last 5 commits) ==="
102+ git log --oneline -5
103+ echo "=== Git status ==="
104+ git status
105+ echo "=== Git diff --stat ==="
106+ git diff --stat
101107 git add .
108+ echo "=== Staged changes ==="
109+ git diff --cached --stat
102110 if git diff --cached --quiet; then
103- echo "No changes to commit — source files and manifest already up to date."
111+ echo "No new changes to commit — source files and manifest already up to date."
104112 else
105113 git commit -m '[AUTO][RELEASE]: Update version number in manifest.yml and source files'
106114 fi
115+ echo "=== Commits ahead of origin/main ==="
116+ git log --oneline origin/main..HEAD
107117 git push -u origin "release-prep-$VERSION_NUMBER"
108118
109119 - name : Create pull request
@@ -193,5 +203,11 @@ jobs:
193203 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
194204 working-directory : ./local_kernel
195205 run : |
196- git push origin --delete "release-prep-$VERSION_NUMBER" || true
206+ # Only delete release-prep branch if the PR was already merged
207+ PR_STATE=$(gh pr list --repo "${{ github.repository }}" --head "release-prep-$VERSION_NUMBER" --json state --jq '.[0].state' 2>/dev/null || echo "")
208+ if [ "$PR_STATE" = "MERGED" ] || [ -z "$PR_STATE" ]; then
209+ git push origin --delete "release-prep-$VERSION_NUMBER" || true
210+ else
211+ echo "Skipping release-prep branch deletion — PR is still open (state: $PR_STATE)"
212+ fi
197213 git push origin --delete "release-$VERSION_NUMBER" || true
0 commit comments