diff --git a/app/components/version-list/row.gjs b/app/components/version-list/row.gjs index 870681c2f7d..6b1c9f60258 100644 --- a/app/components/version-list/row.gjs +++ b/app/components/version-list/row.gjs @@ -135,12 +135,16 @@ export default class VersionRow extends Component { {{#if (eq @version.trustpub_data.provider 'github')}} {{svgJar 'github'}} + {{else if (eq @version.trustpub_data.provider 'gitlab')}} + {{svgJar 'gitlab'}} {{/if}} {{@version.trustpubPublisher}} {{else}} {{#if (eq @version.trustpub_data.provider 'github')}} {{svgJar 'github'}} + {{else if (eq @version.trustpub_data.provider 'gitlab')}} + {{svgJar 'gitlab'}} {{/if}} {{@version.trustpubPublisher}} {{/if}} diff --git a/app/models/version.js b/app/models/version.js index 6d57a367f7e..29ca11b2177 100644 --- a/app/models/version.js +++ b/app/models/version.js @@ -55,7 +55,11 @@ export default class Version extends Model { * @type {string | null} */ get trustpubPublisher() { - return this.trustpub_data?.provider === 'github' ? 'GitHub' : null; + return this.trustpub_data?.provider === 'github' + ? 'GitHub' + : this.trustpub_data?.provider === 'gitlab' + ? 'GitLab' + : null; } /** @@ -65,7 +69,9 @@ export default class Version extends Model { get trustpubUrl() { return this.trustpub_data?.provider === 'github' ? `https://github.com/${this.trustpub_data.repository}/actions/runs/${this.trustpub_data.run_id}` - : null; + : this.trustpub_data?.provider === 'gitlab' + ? `https://gitlab.com/${this.trustpub_data.project_path}/-/jobs/${this.trustpub_data.job_id}` + : null; } @belongsTo('crate', { async: false, inverse: 'versions' }) crate; diff --git a/public/assets/gitlab.svg b/public/assets/gitlab.svg new file mode 100644 index 00000000000..d8607014a45 --- /dev/null +++ b/public/assets/gitlab.svg @@ -0,0 +1,4 @@ + + + +