Skip to content

Use multiline in if statements #130

@yeikel

Description

@yeikel

What problem are you trying to solve?

  • Improve the readability of the workflows when multiple if conditions are used
  • Improve source control as single line changes are easier to reason about

What precondition(s) should be checked before applying this recipe?

The job uses multiple if conditions within a single line

Describe the situation before applying the recipe

    if: ${{  !cancelled() && condition1 && condition2 && condition3 && condition4 && condition5   }}

Describe the situation after applying the recipe

    if: ${{
      !cancelled() &&
      condition1 && 
      condition2 && 
      condition3 && 
      condition4 && 
      condition5 && 
      }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Recipes Wanted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions