Skip to content

Commit d0a2c04

Browse files
feat: extend the logic to add suffix for all the major versions greater than equal 6
1 parent e9269b5 commit d0a2c04

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/helpers/github-link.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import { helper } from '@ember/component/helper';
22
import githubMap, { mainDir } from '../utils/github-map';
33

44
export function githubLink([project, version, file, line], { isEdit = false }) {
5-
// Adjust version if it's a `v6.0.x` pattern to match the Git tags
6-
const adjustedVersion = version.startsWith('v6.0.')
5+
const isEmberProject = project === 'ember';
6+
const majorVersion = parseInt(version.split('.')[0].replace('v', ''), 10);
7+
8+
// Check if the project is 'ember' and adjust the tag only if the major version is >= 6 to match the Git tags
9+
const adjustedVersion = isEmberProject && majorVersion >= 6
710
? `${version}-ember-source`
811
: version;
912

0 commit comments

Comments
 (0)