File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 GH_TOKEN : ${{ steps.production-token.outputs.token }}
7171 PRODUCTION_REPO : kernel/kernel-python-sdk
7272 run : |
73- existing=$(gh pr list --repo "$PRODUCTION_REPO" --head stainless/release --state open --json number --jq '.[0].number')
73+ body=$(mktemp)
74+ git log --oneline production/main..origin/main > "$body"
75+ existing=$(gh pr list --repo "$PRODUCTION_REPO" --head stainless/release --state open --json number --jq 'if length == 0 then "" else .[0].number end')
7476 if [ -z "$existing" ]; then
75- gh pr create --repo "$PRODUCTION_REPO" --base main --head stainless/release --title "Release SDK updates" --body "$(git log --oneline production/main..origin/main)"
77+ gh pr create --repo "$PRODUCTION_REPO" --base main --head stainless/release --title "Release SDK updates" --body-file "$body"
78+ else
79+ gh pr edit "$existing" --repo "$PRODUCTION_REPO" --title "Release SDK updates" --body-file "$body"
80+ fi
81+ if ! gh pr merge stainless/release --repo "$PRODUCTION_REPO" --merge --auto; then
82+ echo "::warning title=Manual promotion required::Merge the promote PR with a merge commit."
7683 fi
77- gh pr merge stainless/release --repo "$PRODUCTION_REPO" --merge --auto || echo "Auto-merge unavailable; merge the promote PR manually with a merge commit."
You can’t perform that action at this time.
0 commit comments