Skip to content

Commit

Permalink
show correct pipelines state when one jobs does not have the status s…
Browse files Browse the repository at this point in the history
…uccess
  • Loading branch information
tonka3000 committed Apr 4, 2022
1 parent b7ef455 commit 4063432
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extensions/gitlab/src/components/commits/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ export async function getCommitStatus(projectID: number, sha: string): Promise<C
.fetch(`projects/${projectID}/repository/commits/${sha}/statuses`)
.then((d) => {
if (d && d.length > 0) {
for (const s of d) {
if (s.status !== "success") {
return s;
}
}
return d[0] as CommitStatus;
}
return undefined;
Expand Down

0 comments on commit 4063432

Please sign in to comment.