Skip to content

Commit e1a94c8

Browse files
committed
fix(ci): use heredoc in sync-upstream open-issue step to fix YAML validation
1 parent 47fe7b4 commit e1a94c8

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/sync-upstream.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,22 @@ jobs:
8787
if: steps.rebase.outputs.result == 'conflict'
8888
env:
8989
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
REPO: ${{ github.repository }}
9091
run: |
91-
gh api repos/${{ github.repository }}/issues \
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" \
92106
--method POST \
93107
--field title="Upstream sync: fork/local rebase needs manual resolution" \
94-
--field body="The scheduled upstream sync fast-forwarded \`dev\` to the latest upstream, but rebasing \`fork/local\` onto it hit conflicts.\n\nResolve locally:\n\`\`\`bash\ngit fetch origin\ngit checkout fork/local\ngit rebase origin/dev\n# resolve conflicts, then\ngit push origin fork/local --force-with-lease\n\`\`\`"
108+
--field "body=${BODY}"

0 commit comments

Comments
 (0)