mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 17:00:30 +00:00
parent
7786028b4a
commit
631b7c2fed
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ export function comparePipelines(a: Pipeline, b: Pipeline): number {
|
||||||
export function comparePipelinesWithStatus(a: Pipeline, b: Pipeline): number {
|
export function comparePipelinesWithStatus(a: Pipeline, b: Pipeline): number {
|
||||||
const bPriority = ['pending', 'running', 'started'].includes(b.status) ? 1 : 0;
|
const bPriority = ['pending', 'running', 'started'].includes(b.status) ? 1 : 0;
|
||||||
const aPriority = ['pending', 'running', 'started'].includes(a.status) ? 1 : 0;
|
const aPriority = ['pending', 'running', 'started'].includes(a.status) ? 1 : 0;
|
||||||
return bPriority - aPriority;
|
return bPriority - aPriority || comparePipelines(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isPipelineActive(pipeline: Pipeline): boolean {
|
export function isPipelineActive(pipeline: Pipeline): boolean {
|
||||||
|
|
Loading…
Reference in a new issue