Skip to content

Feat: add buffer file grpc #44

Feat: add buffer file grpc

Feat: add buffer file grpc #44

name: Auto-fill PR Template
on:
pull_request:
types: [opened, edited, synchronize]
permissions:
contents: write
pull-requests: write
jobs:
autofill_pr:
if: github.actor != 'dependabot'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Generate PR Description
run: |
echo "## 🚀 Pull Request Template" > pr_body.txt
echo "## 📄 Description" >> pr_body.txt
echo "" >> pr_body.txt
echo "This PR includes the following changes:" >> pr_body.txt
git log --format="- %s" --no-merges -n 5 >> pr_body.txt
echo "" >> pr_body.txt
echo "## 🌟 Pull Request Summary" >> pr_body.txt
echo "**Related Issues:** ${{ github.event.pull_request.issue_url }}" >> pr_body.txt
echo "**Commit Messages:**" >> pr_body.txt
git log --oneline --no-merges -5 >> pr_body.txt
echo "" >> pr_body.txt
echo "## 🔄 Type of change" >> pr_body.txt
echo "- [ ] 📚 Documentation, examples, tutorials, dependencies update" >> pr_body.txt
echo "- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)" >> pr_body.txt
echo "- [ ] 🥂 Improvement (non-breaking change which improves an existing feature)" >> pr_body.txt
echo "- [ ] ✨ New feature (non-breaking change which adds functionality)" >> pr_body.txt
echo "- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)" >> pr_body.txt
echo "- [ ] 🔐 Security fix" >> pr_body.txt
- name: Update PR description
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const body = fs.readFileSync('pr_body.txt', 'utf8');
github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
body: body
});