From 902ffb117d28affdfa49792aa5a25db593c8f755 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 12 Nov 2024 19:52:29 +0100 Subject: [PATCH 1/3] [#3] Skip CI if PR is a draft --- .github/workflows/build-test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 26dfd683f..bb9f11564 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 From 5f704ef9f4c3bb6798cd11366d8cd842e93229c9 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 3 Dec 2024 13:49:15 +0100 Subject: [PATCH 2/3] [#3] Inform about how to skip the CI in the PR template --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1ccd7d6c6..d6283793c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,6 +3,10 @@ ## Pre-Review Checklist for the PR Author +To 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 + 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 From 5e34bc8a3106e98ae5121b4780b79e75bb9591fd Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 3 Dec 2024 14:34:37 +0100 Subject: [PATCH 3/3] [#3] Fix markdown lint --- .github/PULL_REQUEST_TEMPLATE.md | 54 +++++++++++++++++++------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d6283793c..7dcad29c5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,24 +1,31 @@ + + ## Notes for Reviewer +## 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 -To 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 - -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 @@ -27,17 +34,20 @@ To prevent CI from running on each commit while the work is still in progress: ## 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 - + Closes # + +