fix: Handles empty updated files gracefully#731
Conversation
|
| echo -e "Script has modified files:\n$(cat ../updated_files.txt)" | ||
| else | ||
| echo "No modified files after running the script, exiting..." | ||
| exit 1 |
There was a problem hiding this comment.
When can the "No modified files after running the script" situation happen? Is it an error or can it happen in normal conditions?
There was a problem hiding this comment.
(Technically, since the script is a param, I guess normal conditions. But based on our typical usage?)
There was a problem hiding this comment.
It an error condition, like when we updated the script here since the infra-deployement repo PR is yet to merge, which will have the yaml files updated by task.. so in push pipeline of build-service PR, it didnot produce any changed file in ../updated_files.txt and in result of that the following steps of the task closed the existing open PR which tries to open a PR by resetting the branch

It will handle situation like closing the PR like this one, when no files has been modified after running the SCRIPT parameter