Skip to content

Commit df8f7c3

Browse files
committed
fix(ci): use gh issue create with body-file instead of heredoc in sync-upstream
1 parent e1a94c8 commit df8f7c3

1 file changed

Lines changed: 14 additions & 18 deletions

File tree

.github/workflows/sync-upstream.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,18 @@ jobs:
8787
if: steps.rebase.outputs.result == 'conflict'
8888
env:
8989
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90-
REPO: ${{ github.repository }}
9190
run: |
92-
BODY=$(cat <<'EOF'
93-
The scheduled upstream sync fast-forwarded `dev` to the latest upstream, but rebasing `fork/local` onto it hit conflicts.
94-
95-
Resolve locally:
96-
```bash
97-
git fetch origin
98-
git checkout fork/local
99-
git rebase origin/dev
100-
# resolve conflicts, then
101-
git push origin fork/local --force-with-lease
102-
```
103-
EOF
104-
)
105-
gh api "repos/${REPO}/issues" \
106-
--method POST \
107-
--field title="Upstream sync: fork/local rebase needs manual resolution" \
108-
--field "body=${BODY}"
91+
printf '%s\n' \
92+
'The sync fast-forwarded dev to upstream but rebasing fork/local hit conflicts.' \
93+
'' \
94+
'Resolve locally:' \
95+
' git fetch origin' \
96+
' git checkout fork/local' \
97+
' git rebase origin/dev' \
98+
' # fix conflicts, then:' \
99+
' git push origin fork/local --force-with-lease' \
100+
> /tmp/issue-body.txt
101+
gh issue create \
102+
--repo "${{ github.repository }}" \
103+
--title "Upstream sync: fork/local rebase needs manual resolution" \
104+
--body-file /tmp/issue-body.txt

0 commit comments

Comments
 (0)