Skip to content

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

Merged
merged 8 commits into from
Nov 30, 2021
Merged

Support for multiple API docs repos #590

merged 8 commits into from
Nov 30, 2021

Conversation

aomarks
Copy link
Member

@aomarks aomarks commented Nov 30, 2021

Misc changes to support analyzing multiple repos/versions when generating API docs.

@github-actions
Copy link

github-actions bot commented Nov 30, 2021

*/
const cloneIfNeeded = async (repo: string, sha: string, dir: string) => {
if (await fileExists(dir)) {
console.log(`${dir} already exists, skipping git clone`);
Copy link
Contributor

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?

Copy link
Member Author

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.

Base automatically changed from old-docs-1 to main November 30, 2021 19:41
@aomarks aomarks merged commit ef1aba9 into main Nov 30, 2021
@aomarks aomarks deleted the old-docs-2 branch November 30, 2021 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants