{"id":13684546,"url":"https://github.com/AckeeCZ/danger-kotlin-junit","last_synced_at":"2025-04-30T21:30:50.872Z","repository":{"id":57732235,"uuid":"278138812","full_name":"AckeeCZ/danger-kotlin-junit","owner":"AckeeCZ","description":"Plugin for danger-kotlin for parsing and reporting JUnit results ","archived":false,"fork":false,"pushed_at":"2021-03-20T07:06:36.000Z","size":70,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T14:07:44.958Z","etag":null,"topics":["danger","danger-kotlin","junit","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AckeeCZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-08T16:21:31.000Z","updated_at":"2022-02-28T08:27:17.000Z","dependencies_parsed_at":"2022-08-28T03:21:48.165Z","dependency_job_id":null,"html_url":"https://github.com/AckeeCZ/danger-kotlin-junit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-junit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-junit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-junit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AckeeCZ%2Fdanger-kotlin-junit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AckeeCZ","download_url":"https://codeload.github.com/AckeeCZ/danger-kotlin-junit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223974618,"owners_count":17234687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["danger","danger-kotlin","junit","kotlin"],"created_at":"2024-08-02T14:00:34.702Z","updated_at":"2024-11-12T05:32:23.702Z","avatar_url":"https://github.com/AckeeCZ.png","language":"Kotlin","funding_links":[],"categories":["Plugins"],"sub_categories":["Kotlin (danger-kotlin)"],"readme":"[ ![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.ackeecz/danger-kotlin-junit/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.ackeecz/danger-kotlin-junit)\n\n# danger-kotlin junit plugin\n\nPlugin for [danger-kotlin](https://github.com/danger/kotlin) parsing and reporting JUnit results.\n\n## Installation\n\nPut\n\n```kotlin\n@file:DependsOn(\"io.github.ackeecz:danger-kotlin-junit:x.y.z\")\n```\n\nto the top of your Dangerfile\n\n## Usage\n\nFirst you need to register the plugin via\n\n```kotlin\nregister plugin JUnitPlugin\n```\n\nand then you can use it through its public methods\n\n```kotlin\nJUnitPlugin.parse(junitReportFile)\nJUnitPlugin.report()\n```\n\n`parse` method accepts varargs of files pointing to the junit reports and parses them to internal representation.\n\n`report` methods will process parsed results and reports them to pull request comments.\n\nExample Dangerfile\n\n```kotlin\n@file:DependsOn(\"io.github.ackeecz:danger-kotlin-junit:x.y.z\")\n\nimport io.github.ackeecz.danger.junit.JUnitPlugin\n\nimport systems.danger.kotlin.danger\nimport systems.danger.kotlin.register\n\nimport java.nio.file.Files\nimport java.nio.file.Paths\nimport java.util.function.BiPredicate\nimport java.util.stream.Collectors\n\nregister plugin JUnitPlugin\n\ndanger(args) {\n    val junitReports = Files.find(Paths.get(\"\"), 10, BiPredicate { path, _ -\u003e\n        val fileName = path.toFile().name\n        fileName.startsWith(\"TEST\") \u0026\u0026 fileName.endsWith(\"xml\")\n    }).map { it.toFile() }.collect(Collectors.toList())\n\n    JUnitPlugin.parse(*junitFiles.toTypedArray())\n    JUnitPlugin.report()\n}\n```\n\nThis will find all files in the depth of 10 relative to current directory that matches the junit report files naming,\nand it will pass them to the plugin for processing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAckeeCZ%2Fdanger-kotlin-junit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAckeeCZ%2Fdanger-kotlin-junit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAckeeCZ%2Fdanger-kotlin-junit/lists"}