Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): updating step refresh logic #104

Merged
merged 3 commits into from
Feb 13, 2020
Merged

fix(build): updating step refresh logic #104

merged 3 commits into from
Feb 13, 2020

Conversation

plyr4
Copy link
Contributor

@plyr4 plyr4 commented Feb 13, 2020

No description provided.

@plyr4 plyr4 requested a review from a team as a code owner February 13, 2020 18:32
@@ -1042,18 +1043,20 @@ refreshBuildSteps model org repo buildNumber =
Success steps ->
Cmd.batch <|
List.map
(\step -> getBuildStep model org repo buildNumber <| String.fromInt step.number)
(\step ->
if not <| isComplete step.status then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here I added step refresh conditional

<|
filterCompletedSteps steps

_ ->
Cmd.none
in
if shouldRefresh model.build then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here I removed the 'build is complete' restriction

@@ -1081,16 +1084,7 @@ shouldRefresh : WebData Build -> Bool
shouldRefresh build =
case build of
Success bld ->
case bld.status of
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a helper, so this code is easier to read

@@ -664,6 +665,24 @@ toStatus status =
succeed Error


{-| isComplete : helper to determine if status is 'complete'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here I consider success failure and error to be "completed" states

Copy link
Contributor

@kneal kneal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐬

@kneal kneal merged commit 00a802a into master Feb 13, 2020
@kneal kneal deleted the fix_refresh_steps branch February 13, 2020 19:04
plyr4 added a commit that referenced this pull request Aug 19, 2022
wass3r added a commit that referenced this pull request Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants