Move ReleasesApiConsumer to a separate file and do simple refactors#3188
Conversation
…r need to be able to specify them independently
koesie10
left a comment
There was a problem hiding this comment.
These changes look good to me. However, perhaps all files related to the distribution could be moved into a codeql-cli/distribution directory? It seems like files like github-api-error.ts don't belong together with the CLI code directly. If you're already doing this in a follow-up PR, that's fine as well.
That's a good idea. I'll move them to that directory in this PR to keep all file file-moving in one PR. |
|
I've moved the files into Since it's so easy to move files around I'm not too bothered about getting it perfect right away, as we can always tweak things. So I won't hold up this PR any more and will merge it now. |
This PR aims to do some simple refactors of the
ReleasesApiConsumerclass and associated code. There is more refactoring I want to do but I'm breaking it up into multiple PRs.Each change is made in a separate commit, and a lot of it is just moving code around, so I recommend looking at each commit individually.
The changes we make are:
distribution.tsand into their own filesReleasesApiConsumerout of the no-workspace tests and into unit-tests so they'll be fasterThis PR deliberately does not attempt to change the parameters of the
getLatestReleasemethod. I think that change will be a little more complicated so I wanted to save that for another PR.Checklist
ready-for-doc-reviewlabel there.