Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bugfix: undefined method line_labels_for#753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ferrarimarco merged 1 commit intogithub-changelog-generator:masterfromunknown repositoryApr 11, 2020
Merged

Bugfix: undefined method line_labels_for#753

ferrarimarco merged 1 commit intogithub-changelog-generator:masterfromunknown repositoryApr 11, 2020

Conversation

ghost
Copy link

If you specify optionissue-line-labels in your.github_changelog_generator it will throw:

/usr/local/bundle/gems/github_changelog_generator-1.15.0/lib/github_changelog_generator/generator/section.rb:52:in `get_string_for_issue': undefined method `line_labels_for' for #<GitHubChangelogGenerator::Section:0x000055b07a12d628> (NoMethodError)

This is fix for it.

jjochen reacted with thumbs up emoji
@ghost
Copy link
Author

@ferrarimarco ping

@ferrarimarco
Copy link
Contributor

Thanks for this PR! Can you please add a test case for this as well?

@ghost
Copy link
Author

ping, any update on this?

@ghost
Copy link
Author

@ferrarimarco ping

@ferrarimarco
Copy link
Contributor

@olleolleolle can you have a look at this as well? Thanks!

@@ -7,7 +7,7 @@ module GitHubChangelogGenerator
#
# @see GitHubChangelogGenerator::Entry
class Section
attr_accessor :name, :prefix, :issues, :labels, :body_only
attr_accessor :name, :options, :prefix, :issues, :labels, :body_only
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If we're not using the setter, can:options become aattr_reader?

@@ -49,7 +49,7 @@ def get_string_for_issue(issue)
encapsulated_title = encapsulate_string issue["title"]

title_with_number = "#{encapsulated_title} [\\##{issue['number']}](#{issue['html_url']})"
title_with_number = "#{title_with_number}#{line_labels_for(issue)}" if @options[:issue_line_labels].present?
title_with_number = "#{title_with_number}#{Entry.new(options).line_labels_for(issue)}" if @options[:issue_line_labels].present?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Perhaps later, one can build an@entry to be used to repeatedly make theline_labels_for call on?

Copy link
Collaborator

@olleolleolleolleolleolle left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This fixes the bug, gets the behavior we want.

In order not to repeat theEntry.new(options) and to not create anSection#options= setter that we don't need, we'll need to return to this code.

@dusan-dragon Thanks for adding this. 🎉

@olleolleolle
Copy link
Collaborator

@ferrarimarco So, one way to deal with the code notes that I mentioned in my ✅ passing review is that we make them, when this has landed in master.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@olleolleolleolleolleolle

Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ferrarimarco@olleolleolle@ddeath

[8]ページ先頭

©2009-2025 Movatter.jp