Skip to content

Commit

Permalink
Update draft-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Jan 15, 2025
1 parent 74a1b4e commit 7a59c0c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/draft-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
if: github.event.action != 'ready_for_review' && github.event.pull_request.draft
steps:
- name: Create status
run: |
Expand All @@ -21,9 +22,9 @@ jobs:
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"state": "${{(github.event.action != 'ready_for_review' && github.event.pull_request.draft) && 'pending' || 'success'}}",
"context": "Draft CI / run",
"target_url": ${{(github.event.action != 'ready_for_review' && github.event.pull_request.draft) && format('"{0}/commits/{1}"', github.event.pull_request.head.repo.html_url, github.event.pull_request.head.ref) || 'null'}},
"description": "${{(github.event.action != 'ready_for_review' && github.event.pull_request.draft) && 'use CI on your repo fork (link on right) until this PR is ready for review' || 'PR is ready for review, running CI in Mill repo'}}"
"state": "pending",
"context": "Draft CI / run (pull_request_target)",
"target_url": ${{ format('"{0}/commits/{1}"', github.event.pull_request.head.repo.html_url, github.event.pull_request.head.ref) }},
"description": "use CI on your repo fork (link on right) until this PR is ready for review"
}' \
--fail-with-body

0 comments on commit 7a59c0c

Please sign in to comment.