Skip to content

Commit a5cbfe2

Browse files
committed
Create a version added by commit ID when branches move
1 parent 0e9e008 commit a5cbfe2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/commonwl/view/workflow/WorkflowService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ public Workflow getWorkflow(GitDetails gitInfo) {
175175
// Add the new workflow if it exists
176176
try {
177177
createQueuedWorkflow(workflow.getRetrievedFrom());
178+
179+
// Add the old commit for the purposes of permalinks
180+
// TODO: Separate concept of commit from branch ref, see #164
181+
GitDetails byOldCommitId = workflow.getRetrievedFrom();
182+
byOldCommitId.setBranch(workflow.getLastCommit());
183+
createQueuedWorkflow(byOldCommitId);
184+
178185
workflow = null;
179186
} catch (Exception e) {
180187
// Add back the old workflow if it is broken now

0 commit comments

Comments
 (0)