-
Notifications
You must be signed in to change notification settings - Fork 207
Support for multiple API docs repos #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A live preview of this PR will be available at the URL(s) below. https://pr590-fabc364---lit-dev-5ftespv5na-uc.a.run.app/ |
5eb2718
to
cb0c3a7
Compare
*/ | ||
const cloneIfNeeded = async (repo: string, sha: string, dir: string) => { | ||
if (await fileExists(dir)) { | ||
console.log(`${dir} already exists, skipping git clone`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't you make sure to do the checkout in case the directory exists, but not at the right SHA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to support the use case where you are working on the code annotations directly from the cloned directory. If you make a change and then check that in, it would be bad to automatically blow that change away when you then go and re-generate the docs.
I added a check that the SHAs match, and throws an exception if it doesn't, telling you to either update the config or delete the directory to fix things.
Misc changes to support analyzing multiple repos/versions when generating API docs.