diff --git a/.github/workflows/danger.yaml b/.github/workflows/danger.yaml new file mode 100644 index 0000000..35d49a1 --- /dev/null +++ b/.github/workflows/danger.yaml @@ -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 }} diff --git a/Dangerfile.df.kts b/Dangerfile.df.kts new file mode 100644 index 0000000..f72f4d0 --- /dev/null +++ b/Dangerfile.df.kts @@ -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") + } + } +} \ No newline at end of file