Skip to content

Add batch_change.{name,description} as templating variables

Warren Gifford requested to merge mrn/batch-change-attributes into main

Created by: mrnugget

This fixes https://github.com/sourcegraph/src-cli/issues/487 by adding batch_change.name and batch_change.description to the templating vars.

I didn't want to use batch because it's ambigious, but I'm also not 100% sure about batch_change since technically the batch change doesn't exist yet. So maybe it should be batch_spec? But that's also not 100% clear cut.

For code reviewers: note that I introduced a little helper struct. That might seem overblown, but while writing the code I realized that I'm about to pass the whole BatchSpec around if I don't add this helper thing. And if I were to pass the *BatchSpec to every *Task and every runSteps then we could get rid of all the intermediate steps, but then everything would need to dig deep into the *BatchSpec. If you think that's fine I can change it. I just thought that for now it's easier and safer to simply pass two duplicated strings around.

Merge request reports

Loading