Skip to content
Merged
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
4 changes: 4 additions & 0 deletions app/components/version-list/row.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,16 @@ export default class VersionRow extends Component {
<a href={{@version.trustpubUrl}} target='_blank' rel='nofollow noopener noreferrer'>
{{#if (eq @version.trustpub_data.provider 'github')}}
{{svgJar 'github'}}
{{else if (eq @version.trustpub_data.provider 'gitlab')}}
{{svgJar 'gitlab'}}
{{/if}}
{{@version.trustpubPublisher}}
</a>
{{else}}
{{#if (eq @version.trustpub_data.provider 'github')}}
{{svgJar 'github'}}
{{else if (eq @version.trustpub_data.provider 'gitlab')}}
{{svgJar 'gitlab'}}
{{/if}}
{{@version.trustpubPublisher}}
{{/if}}
Expand Down
10 changes: 8 additions & 2 deletions app/models/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions public/assets/gitlab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading