1 Star 0 Fork 0

PeterTu_2019/CocoaPods

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dangerfile 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
# Don't let testing shortcuts get into master by accident,
# ensuring that we don't get green builds based on a subset of tests
(git.modified_files + git.added_files - %w(Dangerfile)).each do |file|
next unless File.file?(file)
next unless file =~ /^spec.*\.rb/
contents = File.read(file)
fail("`xit` or `fit` left in tests (#{file})") if contents =~ /^\s*[xf]it/
fail("`fdescribe` left in tests (#{file})") if contents =~ /^\s*fdescribe/
end
# Ensure a clean commits history
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
fail('Please rebase to get rid of the merge commits in this PR')
end
# Request a CHANGELOG entry, and give an example
has_app_changes = !git.modified_files.grep(/lib/).empty?
if !git.modified_files.include?('CHANGELOG.md') && has_app_changes
warn("Please include a CHANGELOG entry to credit yourself! \nYou can find it at [CHANGELOG.md](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md).", :sticky => false)
markdown <<-MARKDOWN
Here's an example of your CHANGELOG entry:
```markdown
* #{github.pr_title}\s\s
[#{github.pr_author}](https://github.com/#{github.pr_author})
[#issue_number](https://github.com/CocoaPods/CocoaPods/issues/issue_number)
```
*note*: There are two invisible spaces after the entry's text.
MARKDOWN
end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/petertu_2019/CocoaPods.git
git@gitee.com:petertu_2019/CocoaPods.git
petertu_2019
CocoaPods
CocoaPods
master

搜索帮助