Skip to content

fix link to changelog on releases of Ember >6.0.0 #1150

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/models/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class ProjectModel extends Model {
@attr filter;
@attr ignoreFiles;
@attr('string') lastRelease;
@attr('string') tagName;
@attr('string') name;
@attr('string') repo;

Expand All @@ -18,6 +19,8 @@ export default class ProjectModel extends Model {
return '';
}

return `https://github.com/${this.repo}/blob/v${this.lastRelease}/${this.changelogPath}`;
const tagName = this.tagName ?? `v${this.lastRelease}`;

return `https://github.com/${this.repo}/blob/${tagName}/${this.changelogPath}`;
Copy link
Member

Choose a reason for hiding this comment

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

Wonder if we could just hardcode it to add the -ember-source suffix.

Would avoid requiring updating an extra property to be manually.

@mansona perhaps you know if it will always be the case now? (I know we're experimenting with release-plan, but not sure if this is related)

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

But what if ember-data or some other package changes the tagging strategy? Do we want to have an if block for each package? Why not put that in the data then?

Or update the project data to have a tag format that uses other properties to generate the tag:

...
repo: emberjs/ember.js
packageName: ember-source # For monorepos / workspaces
lastRelease: 6.4.0 # Manually update, see https://libraries.io/npm/ember-source throughout
tagFormat: v{{lastRelease}}-{{packageName}}
...

So adding a packageName for monorepos (can also be good for other links) and a tagFormat that specifies how to make up the tag?

}
}
1 change: 1 addition & 0 deletions data/project/ember/beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ filter:
- /ember-template-compiler/
repo: emberjs/ember.js
lastRelease: 6.5.0-beta.1 # Manually update See https://libraries.io/npm/ember-source throughout
tagName: v6.5.0-beta.1-ember-source # Manually update
channel: beta
date: 2025-04-28 # Manually update, get date for `initialVersion`
changelogPath: CHANGELOG.md
Expand Down
1 change: 1 addition & 0 deletions data/project/ember/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ filter:
- /ember-template-compiler/
repo: emberjs/ember.js
lastRelease: 6.4.0 # Manually update, see https://libraries.io/npm/ember-source throughout
tagName: v6.4.0-ember-source # Manually update
channel: release
date: 2025-04-28 # Manually update, is today's date
changelogPath: CHANGELOG.md
Expand Down
1 change: 1 addition & 0 deletions lib/content-data-generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const projectTree = new StaticSiteJson(`data/project`, {
'filter',
'repo',
'lastRelease',
'tagName',
'channel',
'date',
'changelogPath',
Expand Down