This repository was archived by the owner on Sep 6, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,14 +10,22 @@ warn("Big PR") if git.lines_of_code > 500
1010
1111# if git.lines_of_code > 3 && !git.modified_files.include?("CHANGELOG.yml")
1212if !git . modified_files . include? ( "CHANGELOG.yml" ) && !declared_trivial
13- fail ( "Please include a CHANGELOG entry. \n You can find it at [CHANGELOG.md](https://github.com/SwiftGen/SwiftGen/blob/master/CHANGELOG.md)." )
13+ repo_url = github . pr_json [ 'head' ] [ 'repo' ] [ 'html_url' ]
14+ pr_number = github . pr_json [ 'number' ]
15+ pr_url = github . pr_json [ 'html_url' ]
16+ pr_title = github . pr_title . sub ( /[?.!,;]?$/ , '' ) . capitalize
17+ pr_author = github . pr_author
18+ pr_author_url = "https://github.com/#{ github . pr_author } "
19+
20+ fail ( "Please include a CHANGELOG entry. \n You can find it at [CHANGELOG.md](#{ repo_url } /blob/master/CHANGELOG.md)." )
1421 changelog_msg = <<-CHANGELOG_FORMAT . gsub ( /^ *\| / , '' )
1522 |Note: we use the following format for CHANGELOG entries:
1623 |```
17- | * Describe your change here. Don’t forget to use 2 spaces at the end
18- | of the last line describing your change.
19- | [#nn](https://github.com/SwiftGen/SwiftGen/pull/nn )
24+ | * #{ pr_title }
25+ | [# #{ pr_number } ]( #{ pr_url } )
26+ | [@ #{ pr_author } ]( #{ pr_author_url } )
2027 |```
28+ |:bulb: Don't forget to use 2 spaces after the full stop at the end of the line describing your changes.
2129CHANGELOG_FORMAT
2230 markdown ( changelog_msg )
2331end
You can’t perform that action at this time.
0 commit comments