Skip to content

Commit c0bd7f7

Browse files
authored
Merge pull request #1129 from dannon/feature/github-repo-link
Link GitHub URL to main IWC repo instead of mirror repos
2 parents aa1e05c + e8633d3 commit c0bd7f7

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

scripts/workflow_manifest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def find_and_load_compliant_workflows(directory):
184184
trsID = f"#workflow/github.com/iwc-workflows/{dirname}/{workflow['name'] or 'main'}"
185185
workflow["trsID"] = trsID
186186
workflow["iwcID"] = create_safe_identifier(trsID)
187+
workflow["repoPath"] = root
187188

188189
dockstore_details, categories, collections = get_dockstore_details(
189190
trsID

website/src/components/WorkflowContent.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const dockstoreWorkflowPageUrl = computed(() => {
4444
return baseUrl + repoPath;
4545
});
4646
47+
const githubWorkflowUrl = computed(() => {
48+
const repoPath = props.workflow?.repoPath?.replace(/^\.\//, "");
49+
return `https://github.com/galaxyproject/iwc/tree/main/${repoPath}`;
50+
});
51+
4752
const doiResolverUrl = computed(() => {
4853
return `https://doi.org/${props.workflow?.doi}`;
4954
});
@@ -381,6 +386,12 @@ onMounted(() => {
381386
{{ workflow.trsID }} ↗
382387
</a>
383388
</li>
389+
<li>
390+
<strong class="text-ebony-clay-900">GitHub: </strong>
391+
<a :href="githubWorkflowUrl" target="_blank" class="text-bay-of-many-700 hover:underline">
392+
{{ githubWorkflowUrl }} ↗
393+
</a>
394+
</li>
384395
</ul>
385396
<h3 class="font-bold text-l mt-4 text-ebony-clay-900">Running this workflow</h3>
386397
<GalaxyInstanceSelector v-model="selectedInstance" />

website/src/models/workflow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface Workflow {
4949
diagram_svg?: string;
5050
trsID: string;
5151
iwcID: string;
52+
repoPath: string;
5253
categories: string[];
5354
collections: string[];
5455
doi?: string;

0 commit comments

Comments
 (0)