Skip to content

Commit

Permalink
Merge pull request #513 from elBoberido/iox2-3-skip-CI-for-wip-pr
Browse files Browse the repository at this point in the history
[#3] Skip CI if PR title starts with 'WIP'
  • Loading branch information
elBoberido authored Dec 3, 2024
2 parents 949d2e0 + 5e34bc8 commit 417196f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 18 deletions.
50 changes: 32 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
<!-- markdownlint-disable MD041 first-line-heading/first-line-h1 -->

## Notes for Reviewer
<!-- Items in addition to the checklist below that the reviewer should look for -->

## Prevent CI from running on each commit while the work is still in progress

* 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

## Pre-Review Checklist for the PR Author

1. [ ] Add sensible notes for the reviewer
1. [ ] PR title is short, expressive and meaningful
1. [ ] Relevant issues are linked in the [References](#references) section
1. [ ] Every source code file has a copyright header with `SPDX-License-Identifier: Apache-2.0 OR MIT`
1. [ ] Branch follows the naming format (`iox2-123-introduce-posix-ipc-example`)
1. [ ] Commits messages are according to this [guideline][commit-guidelines]
- [ ] Commit messages have the issue ID (`[#123] Add posix ipc example`)
- [ ] Commit author matches [Eclipse Contributor Agreement][eca] (and ECA is signed)
1. [ ] Tests follow the [best practice for testing][testing]
1. [ ] Changelog updated [in the unreleased section][changelog] including API breaking changes
1. [ ] Assign PR to reviewer
1. [ ] All checks have passed (except `task-list-completed`)
* [ ] Add sensible notes for the reviewer
* [ ] PR title is short, expressive and meaningful
* [ ] Relevant issues are linked in the [References](#references) section
* [ ] Every source code file has a copyright header with
`SPDX-License-Identifier: Apache-2.0 OR MIT`
* [ ] Branch follows the naming format (`iox2-123-introduce-posix-ipc-example`)
* [ ] Commits messages are according to this [guideline][commit-guidelines]
* [ ] Commit messages have the issue ID (`[#123] Add posix ipc example`)
* [ ] Commit author matches [Eclipse Contributor Agreement][eca](and ECA is signed)
* [ ] Tests follow the [best practice for testing][testing]
* [ ] Changelog updated [in the unreleased section][changelog] including API
breaking changes
* [ ] Assign PR to reviewer
* [ ] All checks have passed (except `task-list-completed`)

[commit-guidelines]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[eca]: http://www.eclipse.org/legal/ECA.php
Expand All @@ -23,17 +34,20 @@

## Checklist for the PR Reviewer

- [ ] Commits are properly organized and messages are according to the guideline
- [ ] Unit tests have been written for new behavior
- [ ] Public API is documented
- [ ] PR title describes the changes
* [ ] Commits are properly organized and messages are according to the guideline
* [ ] Unit tests have been written for new behavior
* [ ] Public API is documented
* [ ] PR title describes the changes

## Post-review Checklist for the PR Author

1. [ ] All open points are addressed and tracked via issues
* [ ] All open points are addressed and tracked via issues

## References

<!-- Use either 'Closes #123' or 'Relates to #123' to reference the corresponding issue. -->
<!-- Use either 'Closes #123' or 'Relates to #123' to reference the corresponding
issue. -->

Closes # <!-- Add issue number after '#' -->

<!-- markdownlint-enable MD041 -->
13 changes: 13 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ on:
# 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

0 comments on commit 417196f

Please sign in to comment.