Compare commits
20 Commits
v1.15.0.pr
...
v1.15.0.pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72452a1315 | ||
|
|
9377fe600a | ||
|
|
11a7243de1 | ||
|
|
307994e11f | ||
|
|
4465adf943 | ||
|
|
5834fd3766 | ||
|
|
b486425af1 | ||
|
|
91ac00c1d3 | ||
|
|
4f640b74ac | ||
|
|
178ebfb1e7 | ||
|
|
eef787d74d | ||
|
|
faf2ddd552 | ||
|
|
14c36317f1 | ||
|
|
deb902ae13 | ||
|
|
10e6287866 | ||
|
|
5bb4d51b96 | ||
|
|
1fac4efe47 | ||
|
|
ad0d972ed9 | ||
|
|
79518161b8 | ||
|
|
db0e848208 |
10
.travis.yml
10
.travis.yml
@@ -6,15 +6,17 @@ before_install:
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- rvm: 2.2.8
|
- rvm: 2.2.7
|
||||||
install: true # This skips 'bundle install'
|
install: true # This skips 'bundle install'
|
||||||
script: gem build github_changelog_generator && gem install *.gem
|
script: gem build github_changelog_generator && gem install *.gem
|
||||||
- rvm: 2.2.8
|
after_success: true # This skips 'codeclimate-test-reporter'
|
||||||
|
- rvm: 2.2.7
|
||||||
install: true # This skips 'bundle install'
|
install: true # This skips 'bundle install'
|
||||||
script: gem build github_changelog_generator && bundle install
|
script: gem build github_changelog_generator && bundle install
|
||||||
gemfile: spec/install-gem-in-bundler.gemfile
|
gemfile: spec/install-gem-in-bundler.gemfile
|
||||||
- rvm: 2.3.5
|
after_success: true # This skips 'codeclimate-test-reporter'
|
||||||
- rvm: 2.4.2
|
- rvm: 2.3.4
|
||||||
|
- rvm: 2.4.1
|
||||||
- rvm: jruby-9.1.13.0
|
- rvm: jruby-9.1.13.0
|
||||||
jdk: oraclejdk8
|
jdk: oraclejdk8
|
||||||
env:
|
env:
|
||||||
|
|||||||
49
CHANGELOG.md
49
CHANGELOG.md
@@ -1,12 +1,59 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## [v1.15.0-rc](https://github.com/skywinder/github-changelog-generator/tree/v1.15.0-rc) (2017-10-29)
|
||||||
|
[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/v1.15.0.pre.beta...v1.15.0-rc)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Add option --require to load custom Ruby code before starting [\#574](https://github.com/skywinder/github-changelog-generator/pull/574) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- issue\_line\_labels and breaking\_labels fail as rake file config params [\#583](https://github.com/skywinder/github-changelog-generator/issues/583)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Add Rake options reported missing [\#584](https://github.com/skywinder/github-changelog-generator/pull/584) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- Aborting on missing --user and --project prints all of usage [\#578](https://github.com/skywinder/github-changelog-generator/pull/578) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- Options\#print\_options + API docs for Options, Parser [\#576](https://github.com/skywinder/github-changelog-generator/pull/576) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- \[docs\] Contributing file [\#575](https://github.com/skywinder/github-changelog-generator/pull/575) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
|
||||||
|
## [v1.15.0.pre.beta](https://github.com/skywinder/github-changelog-generator/tree/v1.15.0.pre.beta) (2017-10-13)
|
||||||
|
[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/v1.15.0.pre.alpha...v1.15.0.pre.beta)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- add breaking-changes section to changelog [\#530](https://github.com/skywinder/github-changelog-generator/pull/530) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- Drop Project-and-Username-finding code [\#451](https://github.com/skywinder/github-changelog-generator/pull/451) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- since\_tag doesn't work when tag specified is the latest tag [\#555](https://github.com/skywinder/github-changelog-generator/issues/555)
|
||||||
|
- since\_tag seems to not be working [\#304](https://github.com/skywinder/github-changelog-generator/issues/304)
|
||||||
|
- filter tags correctly when `since\_tag` is set to most recent tag [\#566](https://github.com/skywinder/github-changelog-generator/pull/566) ([Crunch09](https://github.com/Crunch09))
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- SSL Cert issue on Windows [\#475](https://github.com/skywinder/github-changelog-generator/issues/475)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix regression w/ enhancements in issues\_to\_log [\#573](https://github.com/skywinder/github-changelog-generator/pull/573) ([ekohl](https://github.com/ekohl))
|
||||||
|
- OctoFetcher: Use defaults for request\_options [\#571](https://github.com/skywinder/github-changelog-generator/pull/571) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- OctoFetcher: extract methods [\#570](https://github.com/skywinder/github-changelog-generator/pull/570) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- OctoFetcher: extract method fail\_with\_message [\#569](https://github.com/skywinder/github-changelog-generator/pull/569) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- OctoFetcher: drop unused number\_of\_pages feature [\#568](https://github.com/skywinder/github-changelog-generator/pull/568) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- Travis: Do not test on jruby-head [\#567](https://github.com/skywinder/github-changelog-generator/pull/567) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- Drop unused Rake task [\#564](https://github.com/skywinder/github-changelog-generator/pull/564) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
- Update license date [\#553](https://github.com/skywinder/github-changelog-generator/pull/553) ([benhc123](https://github.com/benhc123))
|
||||||
|
|
||||||
## [v1.15.0.pre.alpha](https://github.com/skywinder/github-changelog-generator/tree/v1.15.0.pre.alpha) (2017-10-01)
|
## [v1.15.0.pre.alpha](https://github.com/skywinder/github-changelog-generator/tree/v1.15.0.pre.alpha) (2017-10-01)
|
||||||
[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/v1.14.3...v1.15.0.pre.alpha)
|
[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/v1.14.3...v1.15.0.pre.alpha)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
- Add newline after version name and Full Changelog link [\#548](https://github.com/skywinder/github-changelog-generator/pull/548) ([ianroberts131](https://github.com/ianroberts131))
|
- Add newline after version name and Full Changelog link [\#548](https://github.com/skywinder/github-changelog-generator/pull/548) ([ianroberts131](https://github.com/ianroberts131))
|
||||||
- Update the token failure example to OctoKit 404 failure [\#525](https://github.com/skywinder/github-changelog-generator/pull/525) ([thebyt3](https://github.com/thebyt3))
|
- Update the token failure example to OctoKit 404 failure [\#525](https://github.com/skywinder/github-changelog-generator/pull/525) ([00xcoffee](https://github.com/00xcoffee))
|
||||||
- Rescue invalid commands and present the valid options list [\#498](https://github.com/skywinder/github-changelog-generator/pull/498) ([Lucashuang0802](https://github.com/Lucashuang0802))
|
- Rescue invalid commands and present the valid options list [\#498](https://github.com/skywinder/github-changelog-generator/pull/498) ([Lucashuang0802](https://github.com/Lucashuang0802))
|
||||||
- bundled cacert.pem with --ssl-ca-file PATH option [\#480](https://github.com/skywinder/github-changelog-generator/pull/480) ([olleolleolle](https://github.com/olleolleolle))
|
- bundled cacert.pem with --ssl-ca-file PATH option [\#480](https://github.com/skywinder/github-changelog-generator/pull/480) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
- Option parsing: Remove tag1, tag2 cruft [\#479](https://github.com/skywinder/github-changelog-generator/pull/479) ([olleolleolle](https://github.com/olleolleolle))
|
- Option parsing: Remove tag1, tag2 cruft [\#479](https://github.com/skywinder/github-changelog-generator/pull/479) ([olleolleolle](https://github.com/olleolleolle))
|
||||||
|
|||||||
60
CONTRIBUTING.md
Normal file
60
CONTRIBUTING.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# How to contribute
|
||||||
|
|
||||||
|
Bug reports and pull requests from users is what keeps this project working.
|
||||||
|
|
||||||
|
## Basics
|
||||||
|
|
||||||
|
1. Create an issue and describe your idea
|
||||||
|
2. [Fork it](https://github.com/skywinder/github-changelog-generator/fork)
|
||||||
|
3. Create your feature branch (`git checkout -b my-new-feature`)
|
||||||
|
4. Commit your changes (`git commit -am 'Add some feature'`)
|
||||||
|
5. Publish the branch (`git push origin my-new-feature`)
|
||||||
|
6. Create a new Pull Request
|
||||||
|
|
||||||
|
## Checking your work
|
||||||
|
|
||||||
|
You can test your workflow with changelog generator with
|
||||||
|
[the skywinder/changelog_test repo].
|
||||||
|
|
||||||
|
You can run the test suite.
|
||||||
|
|
||||||
|
You can run [RuboCop] to check code style.
|
||||||
|
|
||||||
|
The default Rake task, runnable using `rake`, calls `rubocop`, then `spec`.
|
||||||
|
|
||||||
|
[the skywinder/changelog_test repo]: https://github.com/skywinder/changelog_test/
|
||||||
|
[RuboCop]: http://rubocop.readthedocs.io/en/latest/
|
||||||
|
|
||||||
|
## Write documentation
|
||||||
|
|
||||||
|
This project has documentation in a few places:
|
||||||
|
|
||||||
|
### Introduction and usage
|
||||||
|
|
||||||
|
A friendly `README.md` written for many audiences.
|
||||||
|
|
||||||
|
### Examples and advanced usage
|
||||||
|
|
||||||
|
The [wiki].
|
||||||
|
|
||||||
|
### API documentation
|
||||||
|
|
||||||
|
API documentation is written as [YARD] docblocks in the Ruby code.
|
||||||
|
|
||||||
|
This is rendered as Web pages on [Rubydoc.info][github-changelog-generator on Rubydoc.info].
|
||||||
|
|
||||||
|
The completeness of the API documentation is measured on [our page on the Inch CI Web site][github-changelog-generator on Inch CI]
|
||||||
|
|
||||||
|
### man page
|
||||||
|
|
||||||
|
`man/git-generate-changelog.md`
|
||||||
|
|
||||||
|
The man page is for the `git generate-changelog` Git sub-command, which is a wrapper for `github_changelog_generator`. That file is a Markdown file.
|
||||||
|
|
||||||
|
Use the [ronn] gem to generate `.1` and `.html` artifacts like this: `cd man; ronn git-generate-changelog.md`
|
||||||
|
|
||||||
|
[wiki]: https://github.com/skywinder/github-changelog-generator/wiki
|
||||||
|
[YARD]: https://yardoc.org/
|
||||||
|
[github-changelog-generator on Rubydoc.info]: http://www.rubydoc.info/gems/github_changelog_generator
|
||||||
|
[ronn]: https://github.com/rtomayko/ronn
|
||||||
|
[github-changelog-generator on Inch CI]: https://inch-ci.org/github/skywinder/github-changelog-generator
|
||||||
12
README.md
12
README.md
@@ -199,7 +199,7 @@ Here's a [wikipage list of projects](https://github.com/skywinder/Github-Changel
|
|||||||
|
|
||||||
If you've used this project in a live app, please let me know! Nothing makes me happier than seeing someone else take my work and go wild with it.
|
If you've used this project in a live app, please let me know! Nothing makes me happier than seeing someone else take my work and go wild with it.
|
||||||
|
|
||||||
*If you are using `github_changelog_generator` to generate your project's changelog, or know of other projects using it, please [add it to this list] (https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator).*
|
*If you are using `github_changelog_generator` to generate your project's changelog, or know of other projects using it, please [add it to this list](https://github.com/skywinder/github-changelog-generator/wiki/Projects-using-Github-Changelog-Generator).*
|
||||||
|
|
||||||
## Am I missing some essential feature?
|
## Am I missing some essential feature?
|
||||||
|
|
||||||
@@ -270,15 +270,9 @@ can't get the latest version of Ruby installed.
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. Create an issue and describe your idea
|
We have collected notes on how to contribute to this project in [CONTRIBUTING.md].
|
||||||
2. [Fork it](https://github.com/skywinder/github-changelog-generator/fork)
|
|
||||||
3. Create your feature branch (`git checkout -b my-new-feature`)
|
|
||||||
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
||||||
5. Publish the branch (`git push origin my-new-feature`)
|
|
||||||
6. Create a new Pull Request
|
|
||||||
7. Profit! :white_check_mark:
|
|
||||||
|
|
||||||
You can test your workflow with changelog generator with [the skywinder/changelog_test repo](https://github.com/skywinder/changelog_test/).
|
[CONTRIBUTING.md]: CONTRIBUTING.md
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
|
|||||||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
||||||
spec.require_paths = ["lib"]
|
spec.require_paths = ["lib"]
|
||||||
|
|
||||||
spec.add_runtime_dependency "rake", ">= 10.0"
|
|
||||||
spec.add_runtime_dependency "rainbow", ">= 2.2.1"
|
|
||||||
spec.add_runtime_dependency("octokit", ["~> 4.6"])
|
|
||||||
spec.add_runtime_dependency("faraday-http-cache")
|
|
||||||
spec.add_runtime_dependency("activesupport")
|
spec.add_runtime_dependency("activesupport")
|
||||||
spec.add_runtime_dependency("retriable", ["~> 3.0"])
|
spec.add_runtime_dependency("faraday-http-cache")
|
||||||
spec.add_runtime_dependency("multi_json")
|
spec.add_runtime_dependency("multi_json")
|
||||||
|
spec.add_runtime_dependency("octokit", ["~> 4.6"])
|
||||||
|
spec.add_runtime_dependency "rainbow", ">= 2.2.1"
|
||||||
|
spec.add_runtime_dependency "rake", ">= 10.0"
|
||||||
|
spec.add_runtime_dependency("retriable", ["~> 3.0"])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../octo_fetcher"
|
require "github_changelog_generator/octo_fetcher"
|
||||||
require_relative "generator_generation"
|
require "github_changelog_generator/generator/generator_generation"
|
||||||
require_relative "generator_fetcher"
|
require "github_changelog_generator/generator/generator_fetcher"
|
||||||
require_relative "generator_processor"
|
require "github_changelog_generator/generator/generator_processor"
|
||||||
require_relative "generator_tags"
|
require "github_changelog_generator/generator/generator_tags"
|
||||||
|
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
# Default error for ChangelogGenerator
|
# Default error for ChangelogGenerator
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ module GitHubChangelogGenerator
|
|||||||
#
|
#
|
||||||
# @return [String] Generated change log file
|
# @return [String] Generated change log file
|
||||||
def compound_changelog
|
def compound_changelog
|
||||||
|
options.load_custom_ruby_files
|
||||||
fetch_and_filter_tags
|
fetch_and_filter_tags
|
||||||
fetch_issues_and_pr
|
fetch_issues_and_pr
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "delegate"
|
require "delegate"
|
||||||
|
require "github_changelog_generator/helper"
|
||||||
|
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
|
# This class wraps Options, and knows a list of known options. Others options
|
||||||
|
# will raise exceptions.
|
||||||
class Options < SimpleDelegator
|
class Options < SimpleDelegator
|
||||||
|
# Raised on intializing with unknown keys in the values hash,
|
||||||
|
# and when trying to store a value on an unknown key.
|
||||||
UnsupportedOptionError = Class.new(ArgumentError)
|
UnsupportedOptionError = Class.new(ArgumentError)
|
||||||
|
|
||||||
|
# List of valid option names
|
||||||
KNOWN_OPTIONS = %i[
|
KNOWN_OPTIONS = %i[
|
||||||
add_issues_wo_labels
|
add_issues_wo_labels
|
||||||
add_pr_wo_labels
|
add_pr_wo_labels
|
||||||
@@ -43,6 +50,7 @@ module GitHubChangelogGenerator
|
|||||||
pulls
|
pulls
|
||||||
release_branch
|
release_branch
|
||||||
release_url
|
release_url
|
||||||
|
require
|
||||||
simple_list
|
simple_list
|
||||||
since_tag
|
since_tag
|
||||||
ssl_ca_file
|
ssl_ca_file
|
||||||
@@ -55,26 +63,56 @@ module GitHubChangelogGenerator
|
|||||||
verbose
|
verbose
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# @param values [Hash]
|
||||||
|
#
|
||||||
|
# @raise [UnsupportedOptionError] if given values contain unknown options
|
||||||
def initialize(values)
|
def initialize(values)
|
||||||
super(values)
|
super(values)
|
||||||
unsupported_options.any? && raise(UnsupportedOptionError, unsupported_options.inspect)
|
unsupported_options.any? && raise(UnsupportedOptionError, unsupported_options.inspect)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Set option key to val.
|
||||||
|
#
|
||||||
|
# @param key [Symbol]
|
||||||
|
# @param val [Object]
|
||||||
|
#
|
||||||
|
# @raise [UnsupportedOptionError] when trying to set an unknown option
|
||||||
def []=(key, val)
|
def []=(key, val)
|
||||||
supported_option?(key) || raise(UnsupportedOptionError, key.inspect)
|
supported_option?(key) || raise(UnsupportedOptionError, key.inspect)
|
||||||
values[key] = val
|
values[key] = val
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [Hash]
|
||||||
def to_hash
|
def to_hash
|
||||||
values
|
values
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Loads the configured Ruby files from the --require option.
|
||||||
|
def load_custom_ruby_files
|
||||||
|
self[:require].each { |f| require f }
|
||||||
|
end
|
||||||
|
|
||||||
|
# Pretty-prints a censored options hash, if :verbose.
|
||||||
|
def print_options
|
||||||
|
return unless self[:verbose]
|
||||||
|
Helper.log.info "Using these options:"
|
||||||
|
pp(censored_values)
|
||||||
|
puts ""
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def values
|
def values
|
||||||
__getobj__
|
__getobj__
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Returns a censored options hash.
|
||||||
|
#
|
||||||
|
# @return [Hash] The GitHub `:token` key is censored in the output.
|
||||||
|
def censored_values
|
||||||
|
values.clone.tap { |opts| opts[:token] = opts[:token].nil? ? "No token used" : "hidden value" }
|
||||||
|
end
|
||||||
|
|
||||||
def unsupported_options
|
def unsupported_options
|
||||||
values.keys - KNOWN_OPTIONS
|
values.keys - KNOWN_OPTIONS
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
|
|
||||||
require "optparse"
|
require "optparse"
|
||||||
require "pp"
|
require "pp"
|
||||||
require_relative "version"
|
require "github_changelog_generator/version"
|
||||||
require_relative "helper"
|
require "github_changelog_generator/helper"
|
||||||
|
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
class Parser
|
class Parser
|
||||||
# parse options with optparse
|
# parse options with optparse
|
||||||
@@ -19,43 +20,34 @@ module GitHubChangelogGenerator
|
|||||||
abort [e, parser].join("\n")
|
abort [e, parser].join("\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
abort(parser.banner) unless options[:user] && options[:project]
|
unless options[:user] && options[:project]
|
||||||
|
warn "Configure which user and project to work on."
|
||||||
|
warn "Options --user and --project, or settings to that effect. See --help for more."
|
||||||
|
abort(parser.banner)
|
||||||
|
end
|
||||||
|
|
||||||
print_options(options)
|
options.print_options
|
||||||
|
|
||||||
options
|
options
|
||||||
end
|
end
|
||||||
|
|
||||||
# If options set to verbose, print the parsed options.
|
# Setup parsing options
|
||||||
#
|
#
|
||||||
# The GitHub `:token` key is censored in the output.
|
# @param options [Options]
|
||||||
#
|
# @return [OptionParser]
|
||||||
# @param options [Hash] The options to display
|
|
||||||
# @option options [Boolean] :verbose If false this method does nothing
|
|
||||||
def self.print_options(options)
|
|
||||||
if options[:verbose]
|
|
||||||
Helper.log.info "Performing task with options:"
|
|
||||||
options_to_display = options.clone
|
|
||||||
options_to_display[:token] = options_to_display[:token].nil? ? nil : "hidden value"
|
|
||||||
pp options_to_display
|
|
||||||
puts ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# setup parsing options
|
|
||||||
def self.setup_parser(options)
|
def self.setup_parser(options)
|
||||||
parser = OptionParser.new do |opts| # rubocop:disable Metrics/BlockLength
|
OptionParser.new do |opts| # rubocop:disable Metrics/BlockLength
|
||||||
opts.banner = "Usage: github_changelog_generator [options]"
|
opts.banner = "Usage: github_changelog_generator --user USER --project PROJECT [options]"
|
||||||
opts.on("-u", "--user [USER]", "Username of the owner of target GitHub repo") do |last|
|
opts.on("-u", "--user USER", "Username of the owner of target GitHub repo") do |last|
|
||||||
options[:user] = last
|
options[:user] = last
|
||||||
end
|
end
|
||||||
opts.on("-p", "--project [PROJECT]", "Name of project on GitHub") do |last|
|
opts.on("-p", "--project PROJECT", "Name of project on GitHub") do |last|
|
||||||
options[:project] = last
|
options[:project] = last
|
||||||
end
|
end
|
||||||
opts.on("-t", "--token [TOKEN]", "To make more than 50 requests per hour your GitHub token is required. You can generate it at: https://github.com/settings/tokens/new") do |last|
|
opts.on("-t", "--token [TOKEN]", "To make more than 50 requests per hour your GitHub token is required. You can generate it at: https://github.com/settings/tokens/new") do |last|
|
||||||
options[:token] = last
|
options[:token] = last
|
||||||
end
|
end
|
||||||
opts.on("-f", "--date-format [FORMAT]", "Date format. Default is %Y-%m-%d") do |last|
|
opts.on("-f", "--date-format FORMAT", "Date format. Default is %Y-%m-%d") do |last|
|
||||||
options[:date_format] = last
|
options[:date_format] = last
|
||||||
end
|
end
|
||||||
opts.on("-o", "--output [NAME]", "Output file. Default is CHANGELOG.md") do |last|
|
opts.on("-o", "--output [NAME]", "Output file. Default is CHANGELOG.md") do |last|
|
||||||
@@ -121,7 +113,7 @@ module GitHubChangelogGenerator
|
|||||||
opts.on("--include-labels x,y,z", Array, "Only issues with the specified labels will be included in the changelog.") do |list|
|
opts.on("--include-labels x,y,z", Array, "Only issues with the specified labels will be included in the changelog.") do |list|
|
||||||
options[:include_labels] = list
|
options[:include_labels] = list
|
||||||
end
|
end
|
||||||
opts.on("--exclude-labels x,y,z", Array, 'Issues with the specified labels will be always excluded from changelog. Default is \'duplicate,question,invalid,wontfix\'') do |list|
|
opts.on("--exclude-labels x,y,z", Array, "Issues with the specified labels will be always excluded from changelog. Default is 'duplicate,question,invalid,wontfix'") do |list|
|
||||||
options[:exclude_labels] = list
|
options[:exclude_labels] = list
|
||||||
end
|
end
|
||||||
opts.on("--bug-labels x,y,z", Array, 'Issues with the specified labels will be always added to "Fixed bugs" section. Default is \'bug,Bug\'') do |list|
|
opts.on("--bug-labels x,y,z", Array, 'Issues with the specified labels will be always added to "Fixed bugs" section. Default is \'bug,Bug\'') do |list|
|
||||||
@@ -181,6 +173,9 @@ module GitHubChangelogGenerator
|
|||||||
opts.on("--ssl-ca-file [PATH]", "Path to cacert.pem file. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert.pem. Respects SSL_CA_PATH.") do |ssl_ca_file|
|
opts.on("--ssl-ca-file [PATH]", "Path to cacert.pem file. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert.pem. Respects SSL_CA_PATH.") do |ssl_ca_file|
|
||||||
options[:ssl_ca_file] = ssl_ca_file
|
options[:ssl_ca_file] = ssl_ca_file
|
||||||
end
|
end
|
||||||
|
opts.on("--require x,y,z", Array, "Path to Ruby file(s) to require.") do |paths|
|
||||||
|
options[:require] = paths
|
||||||
|
end
|
||||||
opts.on("--[no-]verbose", "Run verbosely. Default is true") do |v|
|
opts.on("--[no-]verbose", "Run verbosely. Default is true") do |v|
|
||||||
options[:verbose] = v
|
options[:verbose] = v
|
||||||
end
|
end
|
||||||
@@ -193,10 +188,9 @@ module GitHubChangelogGenerator
|
|||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
parser
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [Hash] Default options
|
# @return [Options] Default options
|
||||||
def self.default_options
|
def self.default_options
|
||||||
Options.new(
|
Options.new(
|
||||||
date_format: "%Y-%m-%d",
|
date_format: "%Y-%m-%d",
|
||||||
@@ -226,7 +220,8 @@ module GitHubChangelogGenerator
|
|||||||
bug_prefix: "**Fixed bugs:**",
|
bug_prefix: "**Fixed bugs:**",
|
||||||
enhancement_prefix: "**Implemented enhancements:**",
|
enhancement_prefix: "**Implemented enhancements:**",
|
||||||
breaking_prefix: "**Breaking changes:**",
|
breaking_prefix: "**Breaking changes:**",
|
||||||
http_cache: true
|
http_cache: true,
|
||||||
|
require: []
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ module GitHubChangelogGenerator
|
|||||||
|
|
||||||
OPTIONS = %w[ user project token date_format output
|
OPTIONS = %w[ user project token date_format output
|
||||||
bug_prefix enhancement_prefix issue_prefix
|
bug_prefix enhancement_prefix issue_prefix
|
||||||
|
breaking_labels issue_line_labels
|
||||||
header merge_prefix issues
|
header merge_prefix issues
|
||||||
add_issues_wo_labels add_pr_wo_labels
|
add_issues_wo_labels add_pr_wo_labels
|
||||||
pulls filter_issues_by_milestone author
|
pulls filter_issues_by_milestone author
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
VERSION = "1.15.0-beta"
|
VERSION = "1.15.0-rc"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "GIT\-GENERATE\-CHANGELOG" "1" "December 2016" "" ""
|
.TH "GIT\-GENERATE\-CHANGELOG" "1" "October 2017" "" ""
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBgit\-generate\-changelog\fR \- Generate changelog from github
|
\fBgit\-generate\-changelog\fR \- Generate changelog from github
|
||||||
@@ -175,12 +175,6 @@ Issues with the specified labels will be always added to "Fixed bugs" section\.
|
|||||||
Issues with the specified labels will be always added to "Implemented enhancements" section\. Default is \'enhancement,Enhancement\'
|
Issues with the specified labels will be always added to "Implemented enhancements" section\. Default is \'enhancement,Enhancement\'
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
\-\-between\-tags x,y,z
|
|
||||||
.
|
|
||||||
.P
|
|
||||||
Change log will be filled only between specified tags
|
|
||||||
.
|
|
||||||
.P
|
|
||||||
\-\-exclude\-tags x,y,z
|
\-\-exclude\-tags x,y,z
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
@@ -264,6 +258,25 @@ Filename to use for cache\. Default is github\-changelog\-http\-cache in a tempo
|
|||||||
.P
|
.P
|
||||||
Filename to use for cache log\. Default is github\-changelog\-logger\.log in a temporary directory\.
|
Filename to use for cache log\. Default is github\-changelog\-logger\.log in a temporary directory\.
|
||||||
.
|
.
|
||||||
|
.IP "" 4
|
||||||
|
.
|
||||||
|
.nf
|
||||||
|
|
||||||
|
\-\-ssl\-ca\-file [PATH]
|
||||||
|
.
|
||||||
|
.fi
|
||||||
|
.
|
||||||
|
.IP "" 0
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
Path to cacert\.pem file\. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert\.pem\. Respects SSL_CA_PATH\.
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
\-\-require file1\.rb,file2\.rb
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
Paths to Ruby file(s) to require before generating changelog\.
|
||||||
|
.
|
||||||
.P
|
.P
|
||||||
\-\-[no\-]verbose
|
\-\-[no\-]verbose
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -248,6 +248,15 @@
|
|||||||
|
|
||||||
<p> Filename to use for cache log. Default is github-changelog-logger.log in a temporary directory.</p>
|
<p> Filename to use for cache log. Default is github-changelog-logger.log in a temporary directory.</p>
|
||||||
|
|
||||||
|
<pre><code>--ssl-ca-file [PATH]
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p> Path to cacert.pem file. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert.pem. Respects SSL_CA_PATH.</p>
|
||||||
|
|
||||||
|
<p> --require file1.rb,file2.rb</p>
|
||||||
|
|
||||||
|
<p> Paths to Ruby file(s) to require before generating changelog.</p>
|
||||||
|
|
||||||
<p> --[no-]verbose</p>
|
<p> --[no-]verbose</p>
|
||||||
|
|
||||||
<p> Run verbosely. Default is true</p>
|
<p> Run verbosely. Default is true</p>
|
||||||
@@ -277,7 +286,7 @@
|
|||||||
|
|
||||||
<ol class='man-decor man-foot man foot'>
|
<ol class='man-decor man-foot man foot'>
|
||||||
<li class='tl'></li>
|
<li class='tl'></li>
|
||||||
<li class='tc'>December 2016</li>
|
<li class='tc'>October 2017</li>
|
||||||
<li class='tr'>git-generate-changelog(1)</li>
|
<li class='tr'>git-generate-changelog(1)</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|||||||
@@ -179,6 +179,10 @@ Automatically generate change log from your tags, issues, labels and pull reques
|
|||||||
|
|
||||||
Path to cacert.pem file. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert.pem. Respects SSL_CA_PATH.
|
Path to cacert.pem file. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert.pem. Respects SSL_CA_PATH.
|
||||||
|
|
||||||
|
--require file1.rb,file2.rb
|
||||||
|
|
||||||
|
Paths to Ruby file(s) to require before generating changelog.
|
||||||
|
|
||||||
--[no-]verbose
|
--[no-]verbose
|
||||||
|
|
||||||
Run verbosely. Default is true
|
Run verbosely. Default is true
|
||||||
|
|||||||
Reference in New Issue
Block a user