-
Notifications
You must be signed in to change notification settings - Fork 44
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
fix(docs/upload): add safeguard if projects have bidi enabled #1175
base: next
Are you sure you want to change the base?
fix(docs/upload): add safeguard if projects have bidi enabled #1175
Conversation
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.
a few small outstanding things but this looks great on the whole!
src/lib/types.ts
Outdated
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.
😮💨 do you think we could make it so we split out the openapi changes into their own PR? and this PR is branched off of that PR?
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.
New branch here for the openapi changes! #1195
## 🧰 Changes this PR updates our APIv2 openapi description as part of @emilyskuo's work in #1175 and chunks out the OAS into its own dedicated file since it's absolutely massive. you can check out the diff of the file changes [here](next...1346b8b). i tried messing around with JSON module imports so we can eventually automate these updates more easily, but we lose out on a lot of good strict typing that we currently have with `as const satisfies OASDocument`. annoying! ## 🧬 QA & Testing no functional changes. do tests still pass?
…pload-for-users-that-have-bidi
Co-authored-by: Kanad Gupta <[email protected]>
@@ -3245,6 +3245,21 @@ const document = { | |||
description: | |||
'The description of your project. This is used in the page meta description and is seen by search engines and sites like Facebook.', | |||
}, | |||
git: { |
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.
Temporarily adding this in manually instead of generating the doc again - will do that once https://github.com/readmeio/readme/pull/13869 is good and merged
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.
See #1195
🧰 Changes
Adding in a safe guard for ReadMe projects with bidirectional sync enabled, since the docs frontmatter format is different for bidi. By default,
rdme docs upload
may try to "fix" things and modify the markdown files, which could result in corrupted data and/or syncing errors.Once https://github.com/readmeio/readme/pull/13869 is merged, we'll be exposing info on the project's bidi connection if it exists via the get project metadata (
/projects/me
) endpoint. This PR will introduce a check to see if a bidi connection exists, and throw an error if it does. If users want to continue uploading viardme
, they can use the--skip-validation
flag to do so without potential issues fromrdme
's validation & fixing steps.🧬 QA & Testing
Tested this against https://github.com/readmeio/readme/pull/13869 locally. Added some tests for
docs upload
as well.