Skip to content

Commit

Permalink
[#3] Trigger CI when a PR changes from draft to ready
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Dec 4, 2024
1 parent 0ad8d53 commit 7abfe3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

* Set the PR to a draft status, e.g. by the `Convert to draft` link, to indicate
that the work is not yet ready for review
* Once the PR is ready for review, press the `Ready for Review` button and push
a final commit to trigger the CI
* Once the PR is ready for review, press the `Ready for Review` button to
trigger the CI

## Pre-Review Checklist for the PR Author

Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,13 @@ on:
branches: [ main ]
pull_request:
branches: [ main, release* ]
types: [ opened, ready_for_review, synchronize ]

# env:
# RUSTFLAGS: "-C debug-assertions"

jobs:
check_draft_pr:
runs-on: ubuntu-latest
steps:
- name: Check if PR is a draft
run: |
if [ "${{ github.event.pull_request.draft }}" == "true" ]; then
echo "PR is a draft. CI will not proceed."
exit 1 # Abort the CI job
else
echo "PR is not a draft. Proceeding with CI."
fi
changes:
needs: check_draft_pr
runs-on: ubuntu-latest
permissions:
pull-requests: read
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/miri-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main ]
pull_request:
branches: [ main, release* ]
types: [ opened, ready_for_review, synchronize ]

jobs:
miri:
Expand All @@ -23,4 +24,4 @@ jobs:
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: ./internal/scripts/ci_run_miri.sh
run: ./internal/scripts/ci_run_miri.sh

0 comments on commit 7abfe3c

Please sign in to comment.