Module: Metafrazo
- Defined in:
- lib/metafrazo.rb,
lib/metafrazo/git.rb,
lib/metafrazo/config.rb,
lib/metafrazo/version.rb,
lib/metafrazo/git_diff_generator.rb
Defined Under Namespace
Classes: Config, Git, GitDiffGenerator
Constant Summary collapse
- VERSION =
"0.2.1"
Class Attribute Summary collapse
Class Method Summary collapse
- .configure {|config| ... } ⇒ Object
-
.run(payload) ⇒ Object
returns true if your files.
Class Attribute Details
.config ⇒ Object
29 30 31 |
# File 'lib/metafrazo.rb', line 29 def self.config @config ||= Config.new end |
Class Method Details
.configure {|config| ... } ⇒ Object
33 34 35 |
# File 'lib/metafrazo.rb', line 33 def self.configure yield(config) end |
.run(payload) ⇒ Object
returns true if your files
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/metafrazo.rb', line 13 def self.run(payload) token = config.token repo = subject_repo(payload) git = Git.new(token, payload, repo) diff = GitDiffGenerator.new(git).generate changes = local_changes(diff, diff_paths(repo)) unless changes.empty? git.comment((changes)) # git.add_label("bug") end !changes.empty? end |