Skip to content

Commit

Permalink
ci(protocol): release-please creates draft PRs (#18423)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Nov 4, 2024
1 parent 350264c commit dd09f27
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/repo--release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@ jobs:
release-please:
runs-on: [arc-runner-set]
steps:
- uses: googleapis/release-please-action@v4
- name: Run Release Please
id: release_please
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
draft: true

- name: Convert PR to Draft
if: ${{ steps.release_please.outputs.pr != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pr_number=${{ steps.release_please.outputs.pr }}
echo "Converting PR #$pr_number to draft..."
curl -X PATCH \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"draft":true}' \
"https://api.github.com/repos/${{ github.repository }}/pulls/$pr_number"

0 comments on commit dd09f27

Please sign in to comment.