-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
153 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--color | ||
--format=documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
inherit_from: .rubocop_todo.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2016-08-26 14:48:21 -0400 using RuboCop version 0.42.0. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 1 | ||
Metrics/AbcSize: | ||
Max: 16 | ||
|
||
# Offense count: 6 | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes. | ||
# URISchemes: http, https | ||
Metrics/LineLength: | ||
Max: 242 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 12 | ||
|
||
# Offense count: 1 | ||
Style/Documentation: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'test/**/*' | ||
- 'lib/changelog/plugin.rb' | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. | ||
# NamePrefix: is_, has_, have_ | ||
# NamePrefixBlacklist: is_, has_, have_ | ||
# NameWhitelist: is_a? | ||
Style/PredicateName: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'lib/changelog/plugin.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# danger.systems | ||
|
||
changelog.check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in danger-changelog.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,12 @@ Gem::Specification.new do |spec| | |
spec.version = Changelog::VERSION | ||
spec.authors = ['dblock'] | ||
spec.email = ['[email protected]'] | ||
spec.description = %q{A danger.systems plugin that is OCD about your CHANGELOG.} | ||
spec.summary = %q{A danger.systems plugin that is OCD about your CHANGELOG.} | ||
spec.description = 'A danger.systems plugin that is OCD about your CHANGELOG.' | ||
spec.summary = 'A danger.systems plugin that is OCD about your CHANGELOG.' | ||
spec.homepage = 'https://github.com/dblock/danger-changelog' | ||
spec.license = 'MIT' | ||
|
||
spec.files = `git ls-files`.split($/) | ||
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) | ||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) | ||
spec.require_paths = ['lib'] | ||
|
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec| | |
spec.add_development_dependency 'bundler', '~> 1.3' | ||
spec.add_development_dependency 'rake', '~> 10.0' | ||
spec.add_development_dependency 'rspec', '~> 3.4' | ||
spec.add_development_dependency "rubocop", "~> 0.41" | ||
spec.add_development_dependency "yard", "~> 0.8" | ||
spec.add_development_dependency 'rubocop', '~> 0.41' | ||
spec.add_development_dependency 'yard', '~> 0.8' | ||
spec.add_development_dependency 'guard', '~> 2.14' | ||
spec.add_development_dependency 'guard-rspec', '~> 4.7' | ||
spec.add_development_dependency 'listen', '3.0.7' | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Changelog | ||
VERSION = "0.1.0".freeze | ||
VERSION = '0.1.0'.freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,42 @@ | ||
module Danger | ||
# CHANGELOG OCD in your projects. | ||
# | ||
# @example Checking for everuthing | ||
# | ||
# changelog.check | ||
# | ||
# @see dblock/danger-changelog | ||
# @tags changelog | ||
|
||
class DangerChangelog < Plugin | ||
# Has the CHANGELOG file been modified? | ||
# @return [boolean] | ||
def has_changelog_changes? | ||
git.modified_files.include?('CHANGELOG.md') | ||
end | ||
|
||
# Runs all checks. | ||
# @return [void] | ||
def check | ||
have_you_updated_changelog? | ||
end | ||
|
||
# Have you updated CHANGELOG.md? | ||
# @return [boolean] | ||
def have_you_updated_changelog? | ||
if has_changelog_changes? | ||
true | ||
else | ||
markdown <<-MARKDOWN | ||
Here's an example of a CHANGELOG.md entry: | ||
```markdown | ||
* [##{github.pr_json[:number]}](#{github.pr_json[:html_url]}): #{github.pr_title} - [@#{github.pr_author}](https://github.com/#{github.pr_author}). | ||
``` | ||
MARKDOWN | ||
warn "Unless you're refactoring existing code, please update CHANGELOG.md.", sticky: false | ||
false | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters