Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Butler executions filters #922

Merged
merged 13 commits into from
Mar 10, 2021
Merged

Butler executions filters #922

merged 13 commits into from
Mar 10, 2021

Conversation

leandrorodrigueszup
Copy link
Contributor

No description provided.

Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
@boring-cyborg boring-cyborg bot added the butler Improvements/additions/fixes for butler module. label Feb 19, 2021
@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #922 (bce023f) into main (a578993) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #922   +/-   ##
=========================================
  Coverage     77.50%   77.51%           
  Complexity     1978     1978           
=========================================
  Files          1192     1192           
  Lines         16402    16406    +4     
  Branches       1490     1490           
=========================================
+ Hits          12713    12717    +4     
  Misses         3217     3217           
  Partials        472      472           
Flag Coverage Δ Complexity Δ
butler 85.68% <100.00%> (+0.04%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...pi/deployments/controller/executions.controller.ts 100.00% <ø> (ø) 0.00 <0.00> (ø)
...loyments/use-cases/paginated-executions.usecase.ts 100.00% <100.00%> (ø) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a578993...bce023f. Read the comment docs.

cpgo
cpgo previously approved these changes Feb 23, 2021
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
@@ -35,10 +35,10 @@ export class ExecutionQuery {
public page: number

@ApiProperty()
@IsBooleanString()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove the IsBooleanString validation? Is it not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because its not mandatory anymore!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 30 to 38
private getPageSize(actualPageSize: number): number {
return Math.min(actualPageSize, this.maxPageSize)
}

private isLast(page: number, totalPages: number): boolean {
return totalPages > 0 ?
page === (totalPages -1) :
true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't be better to put this in a utils file? I think we might reuse this elsewhere

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 usually try to avoid util files. So, I changed the paginated response interface, so the isLast method could be in it.

Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
Signed-off-by: Leandro Rodrigues <leandro.rodrigues@zup.com.br>
@fandrade-zup fandrade-zup merged commit dcd068f into main Mar 10, 2021
@fandrade-zup fandrade-zup deleted the butler-executions-filters branch March 10, 2021 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
butler Improvements/additions/fixes for butler module. TESTED QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants