Skip to content

Commit 0a1d9c0

Browse files
committed
ci: create PR body from file for generated feature
1 parent dc7902e commit 0a1d9c0

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/generate-gh-feature.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,34 @@ jobs:
111111
- name: Push changes
112112
run: git push origin feature/${{ inputs.ID }}-init
113113

114-
- name: Create Pull Request
115-
env:
116-
GH_TOKEN: ${{ secrets.ARCHIVE_TOKEN }}
114+
- name: Create PR body file
117115
run: |
118-
gh pr create \
119-
--title "feat(${{ inputs.ID }}): init" \
120-
--body "## New Feature: \`${{ inputs.ID }}\`
116+
cat > pr_body.md << 'EOF'
117+
## New Feature: `${{ inputs.ID }}`
121118
122119
**Description:** ${{ inputs.Description }}
123120
124121
**Repository:** [${{ inputs.Repository }}](https://github.com/${{ inputs.Repository }})
125122
126-
**Binaries:** \`${{ inputs.BinaryNames }}\`
123+
**Binaries:** `${{ inputs.BinaryNames }}`
127124
128-
**Version Commands:** \`${{ inputs.BinaryVersionCommands }}\`
125+
**Version Commands:** `${{ inputs.BinaryVersionCommands }}`
129126
130-
**Test Versions:** \`${{ inputs.BinaryNonLatestVersions }}\`
127+
**Test Versions:** `${{ inputs.BinaryNonLatestVersions }}`
131128
132129
---
133130
134131
This PR was automatically generated using the boilerplate templates.
132+
EOF
133+
echo "📝 PR body content:"
134+
cat pr_body.md
135+
136+
- name: Create Pull Request
137+
env:
138+
GH_TOKEN: ${{ secrets.ARCHIVE_TOKEN }}
139+
run: |
140+
gh pr create \
141+
--title "feat(${{ inputs.ID }}): init" \
142+
--body-file pr_body.md \
143+
--base main \
144+
--head feature/${{ inputs.ID }}-init

0 commit comments

Comments
 (0)