Skip to content

Commit b315d5d

Browse files
ci: fail if triggered from Draft PR
1 parent c37a74d commit b315d5d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/csharp.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
lintCodebase:
10+
failOnDraftPullRequest:
11+
name: Fail If Draft Pull Request
12+
if: github.event.pull_request.draft == true
1113
runs-on: ubuntu-latest
14+
steps:
15+
- name: Fails Draft pull request.
16+
run: |
17+
echo "Draft pull requests should not trigger CI. Please mark the pull request as Ready for review to continue."
18+
exit 1
19+
20+
lintCodebase:
1221
name: Lint Codebase
22+
needs: [ failOnDraftPullRequest ]
23+
runs-on: ubuntu-latest
1324
steps:
1425
- name: Checkout code
1526
uses: actions/checkout@v3

0 commit comments

Comments
 (0)