Skip to content
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

Open
wants to merge 15 commits into
base: next
Choose a base branch
from

Conversation

emilyskuo
Copy link
Member

@emilyskuo emilyskuo commented Feb 25, 2025

🚥 Resolves RM-11901

🧰 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 via rdme, they can use the --skip-validation flag to do so without potential issues from rdme'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.

@emilyskuo emilyskuo marked this pull request as ready for review February 28, 2025 22:20
@emilyskuo emilyskuo requested a review from kanadgupta February 28, 2025 22:20
@emilyskuo emilyskuo changed the title chore: add safeguard for docs upload if projects have bidi enabled fix(docs/upload): add safeguard if projects have bidi enabled Feb 28, 2025
Copy link
Member

@kanadgupta kanadgupta left a 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
Copy link
Member

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?

Copy link
Member Author

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

kanadgupta added a commit that referenced this pull request Mar 7, 2025
## 🧰 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?
@@ -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: {
Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1195

@emilyskuo emilyskuo requested a review from kanadgupta March 11, 2025 23:27
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