Use git commands for auto-merge instead of API
This commit is contained in:
@@ -31,8 +31,11 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
echo "✅ Validation passed - Auto-merging PR"
|
echo "✅ Validation passed - Auto-merging PR"
|
||||||
curl -X POST \
|
git config user.name "GitHub Actions"
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
git config user.email "actions@github.com"
|
||||||
-H "Content-Type: application/json" \
|
git fetch origin ${{ github.event.pull_request.head.ref }}
|
||||||
"http://synbox.ruv.wtf:8418/api/v1/repos/litruv/Plugin-Directory/pulls/${{ github.event.pull_request.number }}/merge" \
|
git checkout main
|
||||||
-d '{"Do":"squash","MergeTitleField":"${{ github.event.pull_request.title }}","MergeMessageField":"Auto-merged after validation","delete_branch_after_merge":true}'
|
git merge --squash origin/${{ github.event.pull_request.head.ref }}
|
||||||
|
git commit -m "${{ github.event.pull_request.title }}"
|
||||||
|
git push origin main
|
||||||
|
git push origin --delete ${{ github.event.pull_request.head.ref }}
|
||||||
|
|||||||
Reference in New Issue
Block a user