Skip to content

Replace usage of flow style with block style for job dependencies #129

@yeikel

Description

@yeikel

What problem are you trying to solve?

  • Prefer the usage of the block style as it improves readability
  • Source control of Block Style blocks is also easier

Flow Style: Uses square brackets [] for arrays. Example: items: [item1, item2, item3]

Block Style: Uses new lines and indentation for arrays and objects

items:
  - item1
  - item2
  - item3

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

The job depends on more than one job and uses the flow style declaration

Describe the situation before applying the recipe

  job:
    needs: [ dependency_1, dependency_2, dependency_3, dependency_4, dependency_5... ]
    uses: ...

Describe the situation after applying the recipe

  job:
    needs: 
       - dependency_1
       - dependency_2
       - dependency_3
       - dependency_4
       - dependency_5
    uses: ...

Any additional context

https://www.yaml.info/learn/flowstyle.html
https://syedrakib.medium.com/block-style-yaml-vs-flow-style-yaml-a42eb1082202

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Recipes Wanted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions