Skip to content

feat: new reference upload command#1261

Merged
emilyskuo merged 9 commits into
nextfrom
emily/rm-12965-rdme-references-upload
Jun 18, 2025
Merged

feat: new reference upload command#1261
emilyskuo merged 9 commits into
nextfrom
emily/rm-12965-rdme-references-upload

Conversation

@emilyskuo

@emilyskuo emilyskuo commented Jun 12, 2025

Copy link
Copy Markdown
Contributor
🚥 Resolves RM-12965

🧰 Changes

Creating a new reference upload command for users to upload MD pages to the reference section. This is entirely based on the docs upload command, with most of it being exactly the same, minus the route and some typing.

I had looked into making this an alias of docs upload, but oclif doesn't tell you how the command was invoked, and we'd have to parse argvs to figure out if docs or reference, which could potentially work but would also be pretty brittle. Otherwise, we could create a general upload command for markdown pages and add a type arg, which would be changing up behavior even more.

🧬 QA & Testing

@kanadgupta consolidated our markdown upload command tests in #1262 🎉

@emilyskuo
emilyskuo marked this pull request as ready for review June 14, 2025 00:14
@emilyskuo
emilyskuo requested a review from kanadgupta as a code owner June 14, 2025 00:14
@emilyskuo
emilyskuo requested a review from a team June 14, 2025 00:15
Comment thread __tests__/__fixtures__/docs/existing-docs/subdir/another-doc.md Outdated
Comment thread src/lib/types/openapiDoc.ts Outdated

@kanadgupta kanadgupta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this all looks great! the two blocking pieces of feedback should be fairly trivial:

  1. separating out the type fixes in the src/lib/types/openapiDoc.ts into its own PR
  2. renaming the command from rdme references upload to rdme reference upload. could you also rename the two parent folders from "references" to "reference"?

Comment thread __tests__/__fixtures__/docs/existing-docs/subdir/another-doc.md Outdated
Comment thread src/commands/references/upload.ts Outdated
Comment thread src/index.ts Outdated
Comment thread src/lib/types/openapiDoc.ts
Comment thread __tests__/commands/references/upload.test.ts Outdated
Comment thread __tests__/commands/references/upload.test.ts
@emilyskuo emilyskuo changed the title feat: new references upload command feat: new reference upload command Jun 18, 2025
## 🧰 Changes

this piggybacks off of @emilyskuo's work in
#1261 and implements a suggestion i
had in [this
comment](https://github.com/readmeio/rdme/pull/1261/files#r2151162521)
(i.e., consolidating the tests for guides and reference uploads into a
single test suite wrapped in a `describe.each`). for now it consolidates
the tests for `rdme docs upload` and `rdme reference upload`, but i
figured it'll alleviate some of the burden of shipping support for
custom pages, etc. going forward.

as part of this, i did the following:

- [x] wrapped everything in a `describe.each`
- [x] added a bunch of template strings for the routes
- [x] duplicated a handful of fixtures
- [x] incorporated this feedback:
https://github.com/readmeio/rdme/pull/1261/files#r2151151087

## 🧬 QA & Testing

i went through all of the snapshots to make sure it all checks out, but
please feel free to look through everything yourself!

@kanadgupta kanadgupta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one tiny copy edit below, otherwise LGTM! great work here ❤️‍🔥

Comment thread src/commands/reference/upload.ts Outdated
emilyskuo and others added 2 commits June 18, 2025 11:29
Co-authored-by: Kanad Gupta <git@kanad.dev>
@emilyskuo
emilyskuo merged commit 01e8198 into next Jun 18, 2025
8 checks passed
@emilyskuo
emilyskuo deleted the emily/rm-12965-rdme-references-upload branch June 18, 2025 18:34
kanadgupta pushed a commit that referenced this pull request Jun 18, 2025
# [10.3.0-next.3](v10.3.0-next.2...v10.3.0-next.3) (2025-06-18)

### Features

* new `reference upload` command ([#1261](#1261)) ([01e8198](01e8198))

[skip ci]
@kanadgupta

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 10.3.0-next.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

kanadgupta pushed a commit that referenced this pull request Jun 24, 2025
# [10.3.0](v10.2.2...v10.3.0) (2025-06-24)

### Bug Fixes

* **lib/fetchSchema:** don't fetch OAS schemas from our API ([#1267](#1267)) ([7344309](7344309))
* **openapi/upload:** handle `pending_update` ([#1269](#1269)) ([9e94ac1](9e94ac1))

### Features

* filter `oas/analyzer` data by allowed keys ([#1259](#1259)) ([766fb42](766fb42))
* new `reference upload` command ([#1261](#1261)) ([01e8198](01e8198))
* properly display file size feature in openapi inspect command ([#1257](#1257)) ([d957cb2](d957cb2))

[skip ci]
@kanadgupta

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 10.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kanadgupta kanadgupta added released command:pages Issues pertaining to page upload commands (e.g., `docs`, `reference`, `changelog`, `custompages`) labels Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:pages Issues pertaining to page upload commands (e.g., `docs`, `reference`, `changelog`, `custompages`) released on @next released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants