Skip to content
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 our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credit line bug #535

Merged

Conversation

Lucashuang0802
Copy link
Contributor

Fix issue #507. @olleolleolle please give a review. 馃槂

@olleolleolle olleolleolle merged commit fb7e21f into github-changelog-generator:master Jun 27, 2017
@olleolleolle
Copy link
Collaborator

Thanks! Is it possible to figure out a test for this?

@@ -21,7 +21,8 @@ def compound_changelog

log += File.read(options[:base]) if File.file?(options[:base])

log += "\n\n\\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*"
credit_line = "\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*"
log += "\n\n\#{credit_line}" if log.include? credit_line == false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@olleolleolle do you know where the extra ''? Should it be "\n\n#{credit_line}"?

@Lucashuang0802 Lucashuang0802 deleted the credit-line-bug branch June 27, 2017 05:50
@Lucashuang0802
Copy link
Contributor Author

@olleolleolle perhaps we can check there is only one credit_line text the whole file. WDYT?

@olleolleolle
Copy link
Collaborator

olleolleolle commented Jun 27, 2017

For an integration test approach:

  • Generate a file CHANGELOG.md (or have a fixture file) which has 1 credit_line in it
  • Re-generate with some data (not important what data, just enough so that the credit_line code will be used)
  • Expect that only 1 credit line is in the resulting file

Then, as a follow-up (next) feature:

  • Generate a file CHANGELOG.md (or have a fixture file) which has 2 credit_lines in it
  • Re-generate with some data (not important what data, just enough so that the credit_line code will be used)
  • Expect that only 1 credit line is in the resulting file

The second test would be about mending, repairing, fixing CHANGELOG.md files in the wild that have used earlier versions of the code, or are using the :base option where there may already be a credit_line or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants