pr_releasenotes 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78e490c7b05492ae9c389da01992071a95f386cd79e58775ca150207ed343217
4
- data.tar.gz: 4d076be623487de18e41bd0d65267333c2925d18f5f70d4b256f14c14ab6bb8f
3
+ metadata.gz: 1f55def65ebcb8da0550bab03c5c6d6b0ad775c09cb4fd44ffa4f1d3ef8eaeaa
4
+ data.tar.gz: 1ce9f1cb3378aadf6b96446055b6d64bd2883c32c7ff54b73c7a4f9b545954f2
5
5
  SHA512:
6
- metadata.gz: 02ada146643812fc9c0bb24610ab7b093c7c70560451a2922bce31fb4861bbcffbacdb922fc9edcb4866e71857a3a2dc195a769871bc044dc5446a1289d4df3a
7
- data.tar.gz: 85a5b2df377cc5974d2a834110da4bca1bf62c18aad92077825cc4994b111c44d8cab34eddf4f4f3c9d1f9d5b75026b2dff54834465bf36c1f8a11c7b3c690cf
6
+ metadata.gz: 3f1c0a5e019d7b05f60966ca24daaf822e7b478518fde15e90f9c4ab242629cf036388736080bc4498b18a79930d01fd5e109bf4279479c1c54027e78081b159
7
+ data.tar.gz: 0b944ab1b34325b86602933ce841f0c032ba252bc816bd957c514e9e46b85e04afa81eba24917292a054f812f41df553336ffd6611c624f6a78435e6f436beb2
data/.gitignore CHANGED
File without changes
data/.travis.yml CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/OWNERS CHANGED
File without changes
data/README.md CHANGED
@@ -12,7 +12,7 @@ will generate release notes from your latest release tag to the tip of the maste
12
12
 
13
13
  There are quite a few online tools for generating release notes based on github history, but all the ones I've found rely on commit messages. This makes them inflexible, since it would require rewriting commit history in order to make any changes to the generated notes. In addition, using commit messages forces irrelevant information such as `fixed typo`, `reverted incorrect commit`, and `updated tests/docs` into the release notes.
14
14
 
15
- This tool uses pull request descriptions, so the release notes for any version can be updated at any time by simply updating the corresponding pull request's description and rerunning this tool. In addition, pull request descriptions can have a separate brief and focused section to expose only the necessary information into the release notes.
15
+ This tool uses pull request descriptions, so the release notes for any version can be updated at any time by simply updating the corresponding pull request's description and rerunning this tool. In addition, pull request descriptions can have a separate brief and focused section to expose only the necessary information into the release notes.
16
16
 
17
17
  Finally, this tool provides the additional option to post the release notes back to the github releases page.
18
18
 
@@ -72,15 +72,17 @@ This tool can be invoked right after a release build to automatically add releas
72
72
  For regular releases where a previous release already exists, and a new release is being created, this tool can be invoked after the release is built by using the following form:
73
73
 
74
74
  $ pr_releasenotes --repo <user/repo> --token <token> --end <current_release_tag>
75
-
75
+
76
76
  The tool will set the start_tag to the latest tagged release prior to the current one and generate release notes from that release to the current one.
77
77
 
78
+ By default, a release will be prerelease. Use `--full-release` to create a full release to the repo.
79
+
78
80
  #### Initial release
79
81
 
80
82
  For the initial release from a repo, there is no previous release, so the tool must be run with an explicit start sha or tag:
81
83
 
82
84
  $ pr_releasenotes --repo <user/repo> --token <token> --start <commit_sha> --end <current_release_tag>
83
-
85
+
84
86
  Both the `--start` and `--end` parameters support sha values as well as tags, so release notes can be generated between any two tags or commits.
85
87
 
86
88
 
data/Rakefile CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -241,16 +241,16 @@ module PrReleasenotes
241
241
  # Found existing release, so update it
242
242
  log.info "Found existing #{release.draft? ? 'draft ' : ''}#{release.prerelease? ? 'pre-' : ''}release with tag #{tag_name} at #{release.html_url}#{release.body.nil? || release.body.empty? ? '' : " with body: #{release.body}"}"
243
243
  begin
244
- release = git_client.update_release(release.url, { :name => tag_name, :body => notes_str, :draft => false, :prerelease => true })
245
- log.info "Updated pre-release #{release.id} at #{release.html_url} with body\n\n #{notes_str}"
244
+ release = git_client.update_release(release.url, { :name => tag_name, :body => notes_str, :draft => false, :prerelease => config.prerelease })
245
+ log.info "Updated #{config.prerelease ? "prerelease" : "full release"} #{release.id} at #{release.html_url} with body\n\n #{notes_str}"
246
246
  rescue Octokit::NotFound
247
247
  raise "Unable to post release to github. Ensure your token has the right permissions."
248
248
  end
249
249
  rescue Octokit::NotFound
250
250
  # no existing release, so try create a new one for this end_tag
251
251
  begin
252
- release = git_client.create_release(config.repo, tag_name, { :name => tag_name, :body => notes_str, :draft => false, :prerelease => true })
253
- log.info "Created pre-release #{release.id} at #{release.html_url} with body\n\n #{notes_str}"
252
+ release = git_client.create_release(config.repo, tag_name, { :name => tag_name, :body => notes_str, :draft => false, :prerelease => config.prerelease })
253
+ log.info "Created #{config.prerelease ? "prerelease" : "full release"} #{release.id} at #{release.html_url} with body\n\n #{notes_str}"
254
254
  rescue Octokit::NotFound
255
255
  raise "Unable to post release to github. Ensure your token has the right permissions."
256
256
  end
@@ -22,7 +22,7 @@ module PrReleasenotes
22
22
  require "pr_releasenotes/version"
23
23
 
24
24
  attr_accessor :repo, :token, :tag_prefix, :min_sha_size, :start_tag, :end_tag,
25
- :branch, :include_all_prs, :github_release, :relnotes_group,
25
+ :branch, :include_all_prs, :github_release, :prerelease, :relnotes_group,
26
26
  :categorize, :category_prefix, :category_default, :relnotes_hdr_prefix,
27
27
  :jira_baseurl, :auto_paginate, :log
28
28
 
@@ -48,6 +48,8 @@ module PrReleasenotes
48
48
  @include_all_prs = true
49
49
  # Finish by posting release notes to github
50
50
  @github_release = false
51
+ # Release notes are defaulted to be prerelease
52
+ @prerelease = true
51
53
 
52
54
  # Release notes parsing options. Note that comments will always get stripped
53
55
  # By default, only the PR titles will be used, so match nothing from the description
@@ -125,6 +127,9 @@ module PrReleasenotes
125
127
  opts.on('-p', '--post-to-github', 'Create/update release on github') do
126
128
  @github_release = true
127
129
  end
130
+ opts.on('-f', '--full-release', 'Create a full release') do
131
+ @prerelease = false
132
+ end
128
133
 
129
134
  opts.separator ''
130
135
  opts.on('-d', '--debug', 'Enable debug logging') do
@@ -1,3 +1,3 @@
1
1
  module PrReleasenotes
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pr_releasenotes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - arvindth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-30 00:00:00.000000000 Z
11
+ date: 2019-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -111,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubyforge_project:
115
- rubygems_version: 2.7.7
114
+ rubygems_version: 3.0.3
116
115
  signing_key:
117
116
  specification_version: 4
118
117
  summary: Post pull request based release notes to github releases