-
Notifications
You must be signed in to change notification settings - Fork 65
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for gitlab and [Unreleased] tags in git diff links #37
base: master
Are you sure you want to change the base?
Changes from all commits
259c492
0fdd6b7
707376e
d7d74d2
8dacc9c
26a9397
1c51b43
9f54d40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ before_script: | |
- bundle exec rake | ||
language: ruby | ||
rvm: | ||
- 2.2 | ||
- 2.3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [Unreleased] | ||
### Added | ||
- New awesome feature | ||
|
||
## [0.3.0] - 2015-12-03 | ||
### Added | ||
- RU translation from @aishek. | ||
- pt-BR translation from @tallesl. | ||
- es-ES translation from @ZeliosAriex. | ||
|
||
## [0.2.0] - 2015-10-06 | ||
### Changed | ||
- Remove exclusionary mentions of "open source" since this project can benefit | ||
both "open" and "closed" source projects equally. | ||
|
||
## [0.1.0] - 2015-10-06 | ||
### Added | ||
- Answer "Should you ever rewrite a change log?". | ||
|
||
### Changed | ||
- Improve argument against commit logs. | ||
- Start following [SemVer](http://semver.org) properly. | ||
|
||
## [0.0.8] - 2015-02-17 | ||
### Changed | ||
- Update year to match in every README example. | ||
- Reluctantly stop making fun of Brits only, since most of the world | ||
writes dates in a strange way. | ||
|
||
### Fixed | ||
- Fix typos in recent README changes. | ||
- Update outdated unreleased diff link. | ||
|
||
## [0.0.7] - 2015-02-16 | ||
### Added | ||
- Link, and make it obvious that date format is ISO 8601. | ||
|
||
### Changed | ||
- Clarified the section on "Is there a standard change log format?". | ||
|
||
### Fixed | ||
- Fix Markdown links to tag comparison URL with footnote-style links. | ||
|
||
## [0.0.6] - 2014-12-12 | ||
### Added | ||
- New awesome feature | ||
|
||
### Changed | ||
- Onboarding flow | ||
|
||
### Fixed | ||
- Fix Markdown links | ||
|
||
### Removed | ||
- User tracking | ||
|
||
### Work In Progress | ||
- Sales screen | ||
|
||
### Security | ||
- Enable SSL pinning | ||
|
||
### Deprecated | ||
- Obsolete contact screen | ||
|
||
## [0.0.5 (rc1)] - 2014-08-09 | ||
### Added | ||
- Markdown links to version tags on release headings. | ||
- Unreleased section to gather unreleased changes and encourage note | ||
keeping prior to releases. | ||
|
||
## [0.0.4] - 2014-08-09 | ||
### Added | ||
- Better explanation of the difference between the file ("CHANGELOG") | ||
and its function "the change log". | ||
|
||
### Changed | ||
- Refer to a "change log" instead of a "CHANGELOG" throughout the site | ||
to differentiate between the file and the purpose of the file — the | ||
logging of changes. | ||
|
||
### Removed | ||
- Remove empty sections from CHANGELOG, they occupy too much space and | ||
create too much noise in the file. People will have to assume that the | ||
missing sections were intentionally left out because they contained no | ||
notable changes. | ||
|
||
## [0.0.3] - 2014-08-09 | ||
### Added | ||
- "Why should I care?" section mentioning The Changelog podcast. | ||
|
||
## [0.0.2] - 2014-07-10 | ||
### Added | ||
- Explanation of the recommended reverse chronological release ordering. | ||
|
||
## [0.0.1] - 2014-05-31 | ||
### Added | ||
- This CHANGELOG file to hopefully serve as an evolving example of a standardized open source project CHANGELOG. | ||
- CNAME file to enable GitHub Pages custom domain | ||
- README now contains answers to common questions about CHANGELOGs | ||
- Good examples and basic guidelines, including proper date formatting. | ||
- Counter-examples: "What makes unicorns cry?" | ||
|
||
[0.0.1]: https://github.com/olivierlacan/keep-a-changelog/compare/...v0.0.1 | ||
[0.0.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.1...v0.0.2 | ||
[0.0.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.2...v0.0.3 | ||
[0.0.4]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.3...v0.0.4 | ||
[0.0.5]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.4...v0.0.5 | ||
[0.0.6]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.5...v0.0.6 | ||
[0.0.7]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.6...v0.0.7 | ||
[0.0.8]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.7...v0.0.8 | ||
[0.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0 | ||
[0.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0 | ||
[0.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0 | ||
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...HEAD |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,18 @@ | |
describe 'Stamp CHANGELOG.md action' do | ||
let (:changelog_mock_path) { './../spec/fixtures/CHANGELOG_MOCK.md' } | ||
let (:changelog_mock_path_hook) { './spec/fixtures/CHANGELOG_MOCK.md' } | ||
let (:changelog_mock_unreleased_path) { './../spec/fixtures/CHANGELOG_MOCK_UNRELEASED.md' } | ||
let (:changelog_mock_unreleased_path_hook) { './spec/fixtures/CHANGELOG_MOCK_UNRELEASED.md' } | ||
let (:updated_section_identifier) { '12.34.56' } | ||
|
||
before(:each) do | ||
@original_content = File.read(changelog_mock_path_hook) | ||
@original_content_unreleased = File.read(changelog_mock_unreleased_path_hook) | ||
end | ||
|
||
after(:each) do | ||
File.open(changelog_mock_path_hook, 'w') { |f| f.write(@original_content) } | ||
File.open(changelog_mock_unreleased_path_hook, 'w') { |f| f.write(@original_content_unreleased) } | ||
end | ||
|
||
it 'stamps [Unreleased] section with given identifier' do | ||
|
@@ -75,5 +79,17 @@ | |
modified_file = File.read(changelog_mock_path_hook) | ||
expect(modified_file.lines.last).to eq("[12.34.56]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v12.34.56\n") | ||
end | ||
|
||
it 'creates tags comparion GitHub link with prefix working with [Unreleased] identifiers' do | ||
# Stamp [Unreleased] with given section identifier | ||
Fastlane::FastFile.new.parse("lane :test do | ||
stamp_changelog(changelog_path: '#{changelog_mock_unreleased_path}', | ||
section_identifier: '#{updated_section_identifier}', | ||
git_tag: 'v#{updated_section_identifier}') | ||
end").runner.execute(:test) | ||
|
||
modified_file = File.read(changelog_mock_unreleased_path_hook) | ||
expect(modified_file.lines.last).to eq("[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v12.34.56...HEAD\n") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, could you also add verification that the before-last line has been stamped properly, e.g.:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use
http(s)?://gitlab.com
regex?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't know how to do that in Ruby... I worked out how to to the rest, this is my first time in this language.