GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — bootstrap_form/Dangerfile at main · Bubballoo3/bootstrap_form Expand file tree/ Copy pathDangerfileMore file actions 52 lines (46 loc) · 2.42 KB / Copy pathDangerfileFile metadata and controls52 lines (46 loc) · 2.42 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 # Adapted from https://github.com/ruby-grape/danger/blob/master/Dangerfile # Q: What is a Dangerfile, anyway? A: See http://danger.systems/ # ------------------------------------------------------------------------------ # Additional pull request data # ------------------------------------------------------------------------------ project_name = github.pr_json["base"]["repo"]["name"] pr_number = github.pr_json["number"] pr_url = github.pr_json["_links"]["html"]["href"] # ------------------------------------------------------------------------------ # What changed? # ------------------------------------------------------------------------------ has_lib_changes = !git.modified_files.grep(/^lib/).empty? has_test_changes = !git.modified_files.grep(/^test/).empty? has_changelog_changes = git.modified_files.include?("CHANGELOG.md") # ------------------------------------------------------------------------------ # You've made changes to lib, but didn't write any tests? # ------------------------------------------------------------------------------ if has_lib_changes && !has_test_changes warn("There are code changes, but no corresponding tests. " \ "Please include tests if this PR introduces any modifications in " \ "#{project_name}'s behavior.", sticky: false) end # ------------------------------------------------------------------------------ # Have you updated CHANGELOG.md? # ------------------------------------------------------------------------------ if !has_changelog_changes && has_lib_changes markdown <<-MARKDOWN Here's an example of a CHANGELOG.md entry (place it immediately under the `* Your contribution here!` line): ```markdown * [##{pr_number}](#{pr_url}): #{github.pr_title} - [@#{github.pr_author}](https://github.com/#{github.pr_author}). ``` MARKDOWN warn("Please update CHANGELOG.md with a description of your changes. " \ "If this PR is not a user-facing change (e.g. just refactoring), " \ "you can disregard this.", sticky: false) end # ------------------------------------------------------------------------------ # Did you remove the CHANGELOG's "Your contribution here!" line? # ------------------------------------------------------------------------------ if has_changelog_changes && File.read("CHANGELOG.md").scan(/^\s*[-*] Your contribution here/i).count < 3 raise( "Please put the `- Your contribution here!` line back into CHANGELOG.md.", sticky: false ) end |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |