Skip to content

Template "diffability" #575

@elovelan

Description

@elovelan

Happy to send a PR after a quick discussion on this. It's not a lot of work but there are a few different options.

It would be helpful to see changes between versions of step template scripts. While this is technically achievable by looking at the string in the JSON, it makes for a challenging review. Ideally we could see the changes to the unpacked scripts.

I have a few thoughts on how to do accomplish this:

  1. Store the unpacked templates in a subdirectory of step-templates or alongside the JSON files like _unpack.ps1 currently does.
  2. Make sure that the subdir is kept in sync with the JSON:
    • Add a placeholder in the JSON instead of storing the script contents. Add a build step to combine them. It might make sense to move the JSON to a metadata subdir as well so the website build still works seamlessly.
    • Keep the JSON as-is and add a build step that validates that the script contents are in-sync. Fail the build if not. This adds more overhead to the development effort (have to remember to run the sync before submitting a PR), but makes the build a bit simpler.

OR

  • Don't change anything in the current repo but have the build produce a diff of the unpacked scripts and attach the diff to the PR as a comment. You can't comment on specific lines this way but it at least helps with review.

I also suspect this will make running automated tests a bit easier.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions