Skip to content
49 changes: 49 additions & 0 deletions .github/scripts/create-pr-body.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# Script to create PR body
# Arguments: build_time total_time passed failed run_id comparison_section

BUILD_TIME="$1"
TOTAL_TIME="$2"
PASSED="$3"
FAILED="$4"
RUN_ID="$5"
COMPARISON_SECTION="$6"
REPO="$7"

cat << EOF
## Summary
This PR has been automatically created after successful completion of all CI stages.

## Commit Message(s)
\`\`\`
EOF

cat /tmp/commit_message.txt

cat << EOF
\`\`\`

## Test Results

### ✅ Build Stage
- Status: Passed
- Build Time: ${BUILD_TIME}
- Total Time: ${TOTAL_TIME}
- [View build logs](https://github.com/${REPO}/actions/runs/${RUN_ID})

### ✅ Boot Verification
- Status: Passed
- [View boot logs](https://github.com/${REPO}/actions/runs/${RUN_ID})

### ✅ Kernel Selftests
- **Passed:** ${PASSED}
- **Failed:** ${FAILED}
- [View kselftest logs](https://github.com/${REPO}/actions/runs/${RUN_ID})

${COMPARISON_SECTION}

---
🤖 This PR was automatically generated by GitHub Actions
Run ID: ${RUN_ID}
EOF
Loading
Loading