Example JSON fragment from the deployments API query below. The extra array elements correspond to un-released versions of a package that used to be used in this project, but isn't any more. I'm not what this content is supposed to mean (I wasn't sure why it was an array in the first place), but I think it can be worked around.
Use a heuristic to decide which element to use as the previously deployed version/commit, and add a way to explicitly name the package to use as the previous version source.
Example JSON fragment from the deployments API query below. The extra array elements correspond to un-released versions of a package that used to be used in this project, but isn't any more. I'm not what this content is supposed to mean (I wasn't sure why it was an array in the first place), but I think it can be worked around.
Use a heuristic to decide which element to use as the previously deployed version/commit, and add a way to explicitly name the package to use as the previous version source.