代码拉取完成,页面将自动刷新
message('Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.')
# Checks for modified source files
source_changes_exist = !git.modified_files.grep(/Sources/).empty?
# Checks for changelog entry
no_changelog_entry = !git.modified_files.include?("CHANGELOG.md")
# Checks for tests
no_test_changes = git.modified_files.grep(/Tests/).empty?
if source_changes_exist && no_test_changes
warn('Consider adding tests for new extensions or updating existing tests for a modified SwifterSwift extension')
end
if source_changes_exist && no_changelog_entry
warn('The source files have been modified. Please consider adding a CHANGELOG entry if necessary.')
end
# Swiftlint Danger
# Workaround see: https://github.com/ashfurrow/danger-ruby-swiftlint/issues/87
files_to_lint = (git.modified_files - git.deleted_files) + git.added_files
swiftlint.lint_files(files_to_lint, additional_swiftlint_args: '--no-force-exclude')
# Checks if pull request is labeled as [WIP]
warn('This pull request is marked as Work in Progress. DO NOT MERGE!') if github.pr_title.include? "[WIP]"
# Xcode summary
def summary(platform:)
xcode_summary.report "xcodebuild-#{platform}.json"
end
def label_tests_summary(label:, platform:)
file_name = "xcodebuild-#{platform}.json"
json = File.read(file_name)
data = JSON.parse(json)
data["tests_summary_messages"].each { |message|
if !message.empty?
message.insert(1, " " + label + ":")
end
}
File.open(file_name,"w") do |f|
f.puts JSON.pretty_generate(data)
end
end
label_tests_summary(label: "iOS", platform: "ios")
label_tests_summary(label: "tvOS", platform: "tvos")
label_tests_summary(label: "macOS", platform: "macos")
summary(platform: "ios")
summary(platform: "tvos")
summary(platform: "macos")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。