From 36f7cb346e8a6bbe9fb354a63f02d55b688b47f2 Mon Sep 17 00:00:00 2001 From: Paul Kuruvilla Date: Wed, 16 Oct 2024 19:28:49 +0100 Subject: [PATCH] Add flakiness check status handling in community solution card and model. --- .../community-solution-card/header-label.hbs | 6 ++++++ app/models/community-course-stage-solution.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/app/components/course-page/course-stage-step/community-solution-card/header-label.hbs b/app/components/course-page/course-stage-step/community-solution-card/header-label.hbs index 5dcc72789..9a836249c 100644 --- a/app/components/course-page/course-stage-step/community-solution-card/header-label.hbs +++ b/app/components/course-page/course-stage-step/community-solution-card/header-label.hbs @@ -4,6 +4,12 @@ Private +{{else if (and (eq @solution.flakinessCheckStatus "failure") (current-user-is-staff))}} + + Flaky + + + {{else if @solution.isPinned}} Editor's choice diff --git a/app/models/community-course-stage-solution.ts b/app/models/community-course-stage-solution.ts index 93c7d94a1..c34cc947c 100644 --- a/app/models/community-course-stage-solution.ts +++ b/app/models/community-course-stage-solution.ts @@ -37,6 +37,7 @@ export default class CommunityCourseStageSolutionModel extends Model.extend(View @attr('number') declare approvedCommentsCount: number; @attr('string') declare explanationMarkdown: string; @attr('string') declare commitSha: string; + @attr('string') declare flakinessCheckStatus: 'pending' | 'success' | 'failure' | 'error'; @attr('string') declare githubRepositoryName: string; @attr('boolean') declare githubRepositoryIsPrivate: boolean; @attr('boolean') declare isPinned: boolean;