在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):danger/kotlin开源软件地址(OpenSource Url):https://github.com/danger/kotlin开源编程语言(OpenSource Language):Kotlin 97.2%开源软件介绍(OpenSource Introduction):
Project statusThe project is now on a stable version.
Is possible to generate a working What it looks like todayYou can make a import systems.danger.kotlin.*
danger(args) {
val allSourceFiles = git.modifiedFiles + git.createdFiles
val changelogChanged = allSourceFiles.contains("CHANGELOG.md")
val sourceChanges = allSourceFiles.firstOrNull { it.contains("src") }
onGitHub {
val isTrivial = pullRequest.title.contains("#trivial")
// Changelog
if (!isTrivial && !changelogChanged && sourceChanges != null) {
warn(WordUtils.capitalize("any changes to library code should be reflected in the Changelog.\n\nPlease consider adding a note there and adhere to the [Changelog Guidelines](https://github.com/Moya/contributors/blob/master/Changelog%20Guidelines.md)."))
}
// Big PR Check
if ((pullRequest.additions ?: 0) - (pullRequest.deletions ?: 0) > 300) {
warn("Big PR, try to keep changes smaller if you can")
}
// Work in progress check
if (pullRequest.title.contains("WIP", false)) {
warn("PR is classed as Work in Progress")
}
}
} SetupmacOSbrew install danger/tap/danger-kotlin You need to have Xcode installed and not relying on command line tools. If you're seeing this error when running xcodebuild: $ xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance You can fix it with: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer Linuxbash <(curl -s https://raw.githubusercontent.com/danger/kotlin/master/scripts/install.sh)
source ~/.bash_profile GitHub ActionsYou can add danger/kotlin to your actions jobs:
build:
runs-on: ubuntu-latest
name: "Run Danger"
steps:
- uses: actions/checkout@v1
- name: Danger
uses: danger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Danger a pre built images that you can use with your action: https://github.com/orgs/danger/packages/container/package/danger-kotlin In order to import one of those use the docker:// prefix jobs:
build:
runs-on: ubuntu-latest
name: "Run Danger"
steps:
- uses: actions/checkout@v1
- name: Danger
uses: docker://ghcr.io/danger/danger-kotlin:1.1.0
with:
args: --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Autocomplete and Syntax highlighting in IntelliJ IDEA or Android StudioYou can activate the autocomplete following this additional steps:
Using external maven dependencies into your DangerfileYou can use any external dependency by adding the following lines at the top of your @file:Repository("https://repo.maven.apache.org")
@file:DependsOn("groupId:artifactId:version") Commands
Authors
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论