changelog_merger 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 072057ebe5189dce66b7dfe3af8e6a197203f515
4
- data.tar.gz: cef4de287d71dea139880baa280e504fd877faf0
3
+ metadata.gz: 8d694b8d666a0cce2fb647156a4db7834009b66d
4
+ data.tar.gz: f90d61591bd10f80bf614c6a8cf13ccc9307a829
5
5
  SHA512:
6
- metadata.gz: f3298b46781807967ca816a050ff756fda24c40d0ba42e218bd16433fc76569e3a072eb8d159d058dd94f1c11552551ebb162a6f0d4c2c7513420d159037cdc2
7
- data.tar.gz: ab05e60bb85ad1e7f58d3a2f8c506d7704e16cfff9d50660595a423b85cb3428a12c4603724b2011f39dd4c57a3208bc694e70bac5da9e16bed8e32505f60dd2
6
+ metadata.gz: ae1ad15e751bea3969dba32118c46037c53c86ec5067204d95bd281c736d4b2e66515a215c5fb26ac91f0e667c8722d2f90db64dd44ffc33f55eda3d46e8655a
7
+ data.tar.gz: 60626c47f39017a6d5f56624fb3bef4cdab271ceb8132ea8184980cf0f405b7fb9baf519c06d435a1e81a8a886fe35319027a16bb06f858fc94cf16e297bb10a
@@ -81,39 +81,7 @@ module ChangelogMerger
81
81
  exit
82
82
  end
83
83
 
84
- options[:pr_message] = "Add automatically generated change log file.
85
84
 
86
- Hi, as I can see, you are carefully fill tags and labels for issues in your repo.
87
-
88
- And special for such cases - I created a [github_changelog_generator](https://github.com/skywinder/github-changelog-generator), that generate change log file based on **tags**, **issues** and merged **pull requests** (and split them to separate lists according labels) from :octocat: GitHub Issue Tracker.
89
-
90
- By using this script your Change Log will look like this: [Click me!](https://github.com/skywinder/#{options[:project]}/blob/add-change-log-file/#{options[:output]})
91
-
92
- \> ***What’s the point of a change log?***
93
- To make it easier for users and contributors to see precisely what notable changes have been made between each release (or version) of the project.
94
- \> :copyright: *[http://keepachangelog.com](http://keepachangelog.com/)*
95
-
96
- And now you do not need to spend a lot of :hourglass_flowing_sand: for filling it manually!
97
-
98
- Some essential features of **github_changelog_generator**:
99
-
100
- - Generate **neat** Change Log file according basic [change log guidelines](http://keepachangelog.com). :gem:
101
-
102
- - **Distinguish** issues **according labels**:
103
- - Merged pull requests (all \`merged\` pull-requests)
104
- - Bug fixes (by label \`bug\` in issue)
105
- - Enhancements (by label \`enhancement\` in issue)
106
- - Issues (closed issues \`w/o any labels\`)
107
-
108
- - it **exclude** not-related to changelog issues (any issue, that has label \`question\` \`duplicate\` \`invalid\` \`wontfix\` ) :scissors:
109
-
110
- - You can set which labels should be included/excluded and apply a lot of other customisations, to fit changelog for your personal style :tophat: (*look \`github_changelog_generator --help\` for details)*
111
-
112
- You can easily update this file in future by simply run script: \`github_changelog_generator #{options[:repo]}\` in your repo folder and it make your Change Log file up-to-date again!
113
-
114
- Since now you do not have to fill your \`CHANGELOG.md\` manually: just run script, relax and take a cup of :coffee: before your next release!
115
-
116
- Hope you find this commit as useful. :wink:"
117
85
 
118
86
  if options[:verbose]
119
87
  puts 'Performing task with options:'
@@ -1,3 +1,3 @@
1
1
  module ChangelogMerger
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -18,6 +18,7 @@ module ChangelogMerger
18
18
  go_to_work_dir
19
19
  clone_repo_and_cd
20
20
  check_existing_changelog_file
21
+ generate_pr_message
21
22
  generate_change_log
22
23
  add_commit_push
23
24
  end
@@ -26,15 +27,50 @@ module ChangelogMerger
26
27
  def check_existing_changelog_file
27
28
  if @options[:output] == 'CHANGELOG.md'
28
29
  if File.exist? @options[:output]
29
-
30
30
  puts "#{@options[:output]} found"
31
-
31
+ @options[:chagelog_exists] = 'CHANGELOG.md'
32
32
  extension = File.extname(@options[:output])
33
33
  base = File.basename(@options[:output], extension)
34
34
  @options[:output] = base + '_AUTO' + extension
35
35
  puts "Change it to: #{@options[:output]}"
36
36
  end
37
37
  end
38
+
39
+ if File.exist? 'HISTORY.md'
40
+ @options[:chagelog_exists] = 'HISTORY.md'
41
+ end
42
+ end
43
+
44
+ def generate_pr_message
45
+ @options[:pr_message] = "Add automatically generated change log file.
46
+
47
+ Hi, as I can see, you are carefully fill tags and labels for issues in your repo.
48
+
49
+ For such cases I create a [github_changelog_generator](https://github.com/skywinder/github-changelog-generator), that generate change log file based on **tags**, **issues** and merged **pull requests** from :octocat: Issue Tracker.
50
+
51
+ This PR add change log file to your repo (generated by this script).
52
+ You can look, how it's look like here: [Change Log](https://github.com/skywinder/#{@options[:project]}/blob/add-change-log-file/#{@options[:output]})
53
+
54
+ Some essential features, that has this script:
55
+
56
+ - it **exclude** not-related to changelog issues (any issue, that has label `question` `duplicate` `invalid` `wontfix` )
57
+ - Distinguish issues **according labels**:
58
+ - Merged pull requests (all `merged` pull-requests)
59
+ - Bug fixes (by label `bug` in issue)
60
+ - Enhancements (by label `enhancement` in issue)
61
+ - Issues (closed issues `w/o any labels`)
62
+ - Generate neat Change Log file according basic [change log guidelines](http://keepachangelog.com).
63
+
64
+ You can easily update this file in future by simply run script: `github_changelog_generator #{@options[:repo]}` in your repo folder and it make your Change Log file up-to-date again!
65
+
66
+ Hope you find this commit as useful. :wink:"
67
+
68
+ unless @options[:chagelog_exists].nil?
69
+ @options[:pr_message] += "
70
+
71
+ P.S.
72
+ I know that you already has #{@options[:chagelog_exists]} file but give this script a chance and compare it with yours change log. Hope, you will love it! :blush:"
73
+ end
38
74
  end
39
75
 
40
76
  def add_commit_push
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelog_merger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler