No 'v' in version HTML anchor (#10491)

* No 'v' in version HTML anchor

The footer version output links to https://www.github.com/hashicorp/vault/blob/master/CHANGELOG.md#v160 (in Version 1.6.0) but you reach the anchor with https://github.com/hashicorp/vault/blob/master/CHANGELOG.md#160 (without 'v' before the version number)

* Removed 'v' from URL version anchor

* Create 10491.txt

Co-authored-by: Chelsea Shaw <chelshaw.dev@gmail.com>
This commit is contained in:
Kloppi313 2020-12-08 18:21:48 +01:00 committed by GitHub
parent 7269d32e50
commit 64b4487d8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

3
changelog/10491.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fix footer URL linking to the correct version changelog.
```

View File

@ -4,10 +4,10 @@ import { helper } from '@ember/component/helper';
This helper returns a url to the changelog for the specified version.
It assumes that Changelog headers for Vault versions >= 1.4.3 are structured as:
## v1.5.0
## 1.5.0
### Month, DD, YYYY
## v1.4.5
## 1.4.5
### Month, DD, YYY
etc.
@ -25,7 +25,7 @@ export function changelogUrlFor([version]) {
// only recent versions have a predictable url
if (versionNumber >= '143') {
return url.concat('v', versionNumber);
return url.concat(versionNumber);
}
} catch (e) {
console.log(e);

View File

@ -9,12 +9,12 @@ module('Integration | Helper | changelog-url-for', function(hooks) {
test('it builds an enterprise URL', function(assert) {
const result = changelogUrlFor(['1.5.0+prem']);
assert.equal(result, CHANGELOG_URL.concat('v150'));
assert.equal(result, CHANGELOG_URL.concat('150'));
});
test('it builds an OSS URL', function(assert) {
const result = changelogUrlFor(['1.4.3']);
assert.equal(result, CHANGELOG_URL.concat('v143'));
assert.equal(result, CHANGELOG_URL.concat('143'));
});
test('it returns the base changelog URL if the version is less than 1.4.3', function(assert) {