Autodetect version tags#2147
Conversation
a3e344e to
562a917
Compare
Implements ossf#2139 Signed-off-by: Arnout Engelen <arnout@bzzt.net>
562a917 to
51c7f0d
Compare
| - 9D26:37EF3E:1EB8250:1F0C056:6673E0A2 | ||
| body: | ||
| encoding: UTF-8 | ||
| string: '[{"name":"v1.99.0","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.99.0","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.99.0","commit":{"sha":"436e71b51def92ac7c27c02e9858b533894673e8","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/436e71b51def92ac7c27c02e9858b533894673e8"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjk5LjA="},{"name":"v1.1.8-pre","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.8-pre","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.8-pre","commit":{"sha":"0c23c66c1f5c9870f8a43c03674cf2493c14fcc9","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/0c23c66c1f5c9870f8a43c03674cf2493c14fcc9"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuOC1wcmU="},{"name":"v1.1.7","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.7","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.7","commit":{"sha":"3dc41280462aec1b0fd94b31552388afea29d3eb","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/3dc41280462aec1b0fd94b31552388afea29d3eb"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuNw=="},{"name":"v1.1.6","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.6","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.6","commit":{"sha":"d1c1b4a190c3406148cfab6c168b9075282bc788","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/d1c1b4a190c3406148cfab6c168b9075282bc788"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuNg=="},{"name":"v1.1.4","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.4","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.4","commit":{"sha":"fc1a6da1de15e13159b524dfd558cb9de686818f","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/fc1a6da1de15e13159b524dfd558cb9de686818f"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuNA=="},{"name":"v1.1.3","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.3","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.3","commit":{"sha":"da3600fb43e1ce8e5648751f3e14144929e9a1d5","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/da3600fb43e1ce8e5648751f3e14144929e9a1d5"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuMw=="},{"name":"v1.1.2","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.2","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.2","commit":{"sha":"477600a0f74a283f577d0b4ed669b4e855bfc9cc","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/477600a0f74a283f577d0b4ed669b4e855bfc9cc"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuMg=="},{"name":"v1.1.1","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.1","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.1","commit":{"sha":"3b64e84b8a2635fe24c181060c97f3429b07a94a","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/3b64e84b8a2635fe24c181060c97f3429b07a94a"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuMQ=="},{"name":"v1.1.0","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.1.0","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.1.0","commit":{"sha":"cf038381fe6cec6b95891d6cae206af839e6abd1","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/cf038381fe6cec6b95891d6cae206af839e6abd1"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjEuMA=="},{"name":"v1.0.2","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.0.2","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.0.2","commit":{"sha":"ec00bab01dab52088a610ab047b0f66614a52d95","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/ec00bab01dab52088a610ab047b0f66614a52d95"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjAuMg=="},{"name":"v1.0.1","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.0.1","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.0.1","commit":{"sha":"0bb087786c96a10935dbc32055c5c76cde9bc6b2","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/0bb087786c96a10935dbc32055c5c76cde9bc6b2"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjAuMQ=="},{"name":"v1.0","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v1.0","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v1.0","commit":{"sha":"1a1a89b922187f9fe4615a8a9d836e862e8881db","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/1a1a89b922187f9fe4615a8a9d836e862e8881db"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YxLjA="},{"name":"v0.5","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.5","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.5","commit":{"sha":"86ea97475355cd7ecf873ce3ccf6bd5a3e9620a7","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/86ea97475355cd7ecf873ce3ccf6bd5a3e9620a7"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjU="},{"name":"v0.1.5","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.5","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.5","commit":{"sha":"4c2154c06e6493c622985ece0e30647d9bac68fc","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/4c2154c06e6493c622985ece0e30647d9bac68fc"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuNQ=="},{"name":"v0.1.4","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.4","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.4","commit":{"sha":"f0e89e21fa60c9eb93c24b7e1db44d158fd368d6","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/f0e89e21fa60c9eb93c24b7e1db44d158fd368d6"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuNA=="},{"name":"v0.1.3","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.3","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.3","commit":{"sha":"8dfbdaeb7ecd75ea7e8a284c8cf6ace9d8515c67","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/8dfbdaeb7ecd75ea7e8a284c8cf6ace9d8515c67"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMw=="},{"name":"v0.1.2","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.2","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.2","commit":{"sha":"f7fe11a666e32920390999dec4d1f4f48925fe25","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/f7fe11a666e32920390999dec4d1f4f48925fe25"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMg=="},{"name":"v0.1.1","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.1","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.1","commit":{"sha":"07d6b155c90bd096c549e7e2b08451f72c1393a1","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/07d6b155c90bd096c549e7e2b08451f72c1393a1"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMQ=="},{"name":"v0.1.0","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.0","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.0","commit":{"sha":"1cf88e2488e716b8af74e4557212f50ae9181f7e","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/1cf88e2488e716b8af74e4557212f50ae9181f7e"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMA=="},{"name":"v0.1.0-RC4","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.0-RC4","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.0-RC4","commit":{"sha":"8d107cb298a184755886d271b7152c48cf8c9fc6","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/8d107cb298a184755886d271b7152c48cf8c9fc6"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMC1SQzQ="},{"name":"v0.1.0-RC3","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.0-RC3","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.0-RC3","commit":{"sha":"db74a1bfb09f8dc11f68b51f2fbc3ed97a5612bd","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/db74a1bfb09f8dc11f68b51f2fbc3ed97a5612bd"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMC1SQzM="},{"name":"v0.1.0-RC2","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.0-RC2","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.0-RC2","commit":{"sha":"bb357a0ec1eba229f55a38973323dd5274e63dac","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/bb357a0ec1eba229f55a38973323dd5274e63dac"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMC1SQzI="},{"name":"v0.1.0-RC1","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/v0.1.0-RC1","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/v0.1.0-RC1","commit":{"sha":"e15cc4ad7570f4db66157fa24dd8c38dba80c474","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/e15cc4ad7570f4db66157fa24dd8c38dba80c474"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzL3YwLjEuMC1SQzE="},{"name":"1.0.1","zipball_url":"https://api.github.com/repos/assimilation/assimilation-official/zipball/refs/tags/1.0.1","tarball_url":"https://api.github.com/repos/assimilation/assimilation-official/tarball/refs/tags/1.0.1","commit":{"sha":"0bb087786c96a10935dbc32055c5c76cde9bc6b2","url":"https://api.github.com/repos/assimilation/assimilation-official/commits/0bb087786c96a10935dbc32055c5c76cde9bc6b2"},"node_id":"MDM6UmVmNDIzNzMwNDY6cmVmcy90YWdzLzEuMC4x"}]' |
There was a problem hiding this comment.
This is cheating a bit: manually added some tags to have a more realistic unit test. if someone could add a version tag to https://github.com/ciitest/test-repo then we can use the 'real' response here.
andrewfader
left a comment
There was a problem hiding this comment.
I would suggest just to make a new test-repo and add a new test case. It's not a good practice to edit the VCR cassettes by hand unless very trivial edits that don't relate to the object under test. You should erase those cassettes and re-record them if you need to, but otherwise, just make a new test case so you can record cassettes against a real API instead of copying it in.
I agree it would be better to record cassettes instead of hand-editing them. I cannot create repo's under ciitest/coreinfrastructure, though, and it'd be a bit awkward to record them against repo's not under ciitest/coreinfrastructure control - which is why I asked to add a version tag to https://github.com/ciitest/test-repo . If no-one can create a tag on https://github.com/ciitest/test-repo (or create a new repo under ciitest/coreinfrastructure) I'll indeed create a repo under my own account and test against that. |
|
Someone probably can but I don't know who it is. @david-a-wheeler might know. But fine to use your own repo for now. Or make a fake github user called ciitest4. That is what some of the other stuff is. |
Towards #2139