File tree 2 files changed +33
-0
lines changed 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 56
56
upload-code-coverage : true
57
57
secrets :
58
58
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
59
+ danger-check :
60
+ runs-on : ubuntu-latest
61
+ permissions :
62
+ pull-requests : write
63
+ statuses : write
64
+ steps :
65
+ - name : ' Checkout Repository'
66
+ uses : actions/checkout@v4
67
+ - name : Danger
68
+
69
+ with :
70
+ run-mode : ci
71
+ dangerfile : Dangerfile.df.kts
72
+ env :
73
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74
+
Original file line number Diff line number Diff line change
1
+ @file:Suppress(" ktlint:standard:no-wildcard-imports" )
2
+
3
+ import systems.danger.kotlin.*
4
+
5
+ danger(args) {
6
+ onGitHub {
7
+ val prLabels = issue.labels
8
+ when (prLabels.size) {
9
+ 0 -> fail(" PR must have labels" )
10
+ 1 ->
11
+ prLabels.find { it.name.equals(" ignore" , ignoreCase = true ) }?.let {
12
+ warn(" PR must have labels other then '[${it.name} ](${it.url} )'" )
13
+ }
14
+ else -> {}
15
+ }
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments