Skip to content

Commit

Permalink
Merge pull request #1 from kyrillosgait/feature/danger
Browse files Browse the repository at this point in the history
Integrate Danger
  • Loading branch information
kyrillosgait authored Jul 25, 2023
2 parents 28a7982 + b9e9f08 commit 46b225c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/danger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Danger

on: workflow_dispatch

jobs:
danger:
runs-on: ubuntu-latest
name: "Run Danger"

steps:
- uses: actions/checkout@v3
- name: Danger
uses: docker://ghcr.io/danger/danger-kotlin:1.2.0
with:
args: --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
13 changes: 13 additions & 0 deletions Dangerfile.df.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import systems.danger.kotlin.*

danger(args) {

val allSourceFiles = git.modifiedFiles + git.createdFiles
val sourceChanges = allSourceFiles.firstOrNull { it.contains("src") }

onGitHub {
if (pullRequest.title.contains("WIP", false)) {
warn("PR is classed as Work in Progress")
}
}
}

0 comments on commit 46b225c

Please sign in to comment.