Skip to content

Commit

Permalink
Tweak default changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre authored and mergify[bot] committed Oct 28, 2020
1 parent ef05be9 commit b98e559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/tasks/changelog_spec.rb
Expand Up @@ -65,7 +65,7 @@

it 'generates correct content' do
expect(entry.content).to eq <<~MD
* [#567](https://github.com/rubocop-hq/rubocop/pull/567): Do something cool. ([@johndoe][])
* [#567](https://github.com/rubocop-hq/rubocop/issues/567): Do something cool. ([@johndoe][])
MD
end
end
Expand Down
3 changes: 2 additions & 1 deletion tasks/changelog.rb
Expand Up @@ -21,9 +21,10 @@ class Changelog

# New entry
Entry = Struct.new(:type, :body, :ref_type, :ref_id, :user, keyword_init: true) do
def initialize(type:, body: last_commit_title, ref_type: :pull, ref_id: nil, user: github_user)
def initialize(type:, body: last_commit_title, ref_type: nil, ref_id: nil, user: github_user)
id, body = extract_id(body)
ref_id ||= id || 'x'
ref_type ||= id ? :issues : :pull
super
end

Expand Down

0 comments on commit b98e559

Please sign in to comment.