Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds OpenAPI-driven REST API docs generation to the docs site (plugin, theme, scripts, config), updates CI to run API docs generation before site build, updates dependencies and packaging, ignores generated docs in VCS while preserving a category file, and tweaks minor docs/CI text. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub
participant Actions as GitHub Actions
participant Gen as gen-api-docs
participant Docusaurus as Docusaurus build
participant Site as Docs output
Dev->>GH: push changes (including `seerr-api.yml` or docs)
GH->>Actions: trigger workflows (docs-deploy / test-docs)
Actions->>Gen: run `pnpm gen-api-docs all`
Gen->>Docusaurus: write generated files to `docs/api`
Actions->>Docusaurus: run `pnpm build` (after gen succeeds)
Docusaurus->>Site: build site including generated API docs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 6/8 reviews remaining, refill in 10 minutes and 29 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/docs-deploy.yml:
- Around line 58-60: The workflow only triggers on changes to docs/** and
gen-docs/**, so OpenAPI spec-only changes (e.g., updates to seerr-api.yml) won't
run the "Build website" step in gen-docs (run: pnpm gen-api-docs all && pnpm
build); update the workflow trigger (the on: push / pull_request paths) to
include the OpenAPI spec file(s) (for example seerr-api.yml or the directory
where specs live) so changes to the spec will execute the Build website step in
gen-docs.
In @.github/workflows/test-docs.yml:
- Around line 21-22: The test job "test-build" in the workflow test-docs.yml
only runs the build and must be aligned with the deploy job; update the
"test-build" job to run the same steps the deploy job performs (include the
API-doc generation step that was added to deploy and any validation steps for
seerr-api.yml), e.g., add the API-doc generation command(s) (the same pnpm
script(s) invoked by deploy) and any linter/validation commands used for
seerr-api.yml so PRs exercise the same pipeline as deployment.
In `@docs/troubleshooting.mdx`:
- Line 106: The link text "HTTP(S) Proxy" points to the anchor
"#enable-proxy-support" which is a different setting; update the link so text
and anchor match: either change the href to the HTTP(S) Proxy anchor (e.g., use
/using-seerr/settings/network#http(s)-proxy or the exact anchor used in the site
for the HTTP(S) Proxy heading) or rename the link text to "Enable Proxy Support"
to match the existing `#enable-proxy-support` anchor; edit the line containing
"You can configure Seerr to use a proxy with the [HTTP(S)
Proxy](/using-seerr/settings/network#enable-proxy-support) setting."
accordingly.
In `@gen-docs/README.md`:
- Around line 37-40: The README entry for the "clean-api-docs" command is
missing a warning about its destructive behavior; update the description for the
command `pnpm clean-api-docs all` (and any mention of `clean-api-docs`) to state
that it will delete tracked docs such as `docs/api/_category_.json` and either
add a restore step (e.g., how to recover that file from git) or explicitly warn
contributors not to run it without backing up those files. Ensure the README
text mentions the exact file `docs/api/_category_.json` and gives a brief
recovery command (git restore or git checkout) or a clear cautionary note.
- Around line 33-40: Replace the inline fenced examples for the two commands so
they're markdownlint-clean: remove the leading "$" prompt and add a language to
the fences (use bash) for the commands `pnpm gen-api-docs all` and `pnpm
clean-api-docs all` so the blocks read as ```bash pnpm gen-api-docs all ``` and
```bash pnpm clean-api-docs all ``` to satisfy MD040/MD014.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 47b9ccf7-1541-478c-9702-f99f178ae3a5
⛔ Files ignored due to path filters (1)
gen-docs/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
.github/workflows/docs-deploy.yml.github/workflows/test-docs.yml.gitignorebin/duplicate-detector/package.jsondocs/api/_category_.jsondocs/troubleshooting.mdxgen-docs/README.mdgen-docs/docusaurus.config.tsgen-docs/package.json
efe6cd0 to
ebd0353
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
gen-docs/README.md (1)
37-41:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winDocument
clean-api-docsas destructive (with restore guidance).At Line 37, “cleans REST API documentation” is too soft for this repo behavior. This command can remove tracked docs (notably
docs/api/_category_.json), so please add a clear warning and a quick recovery command (e.g.,git restore docs/api/_category_.json).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@gen-docs/README.md` around lines 37 - 41, The README's description for the pnpm script clean-api-docs is too mild; update the entry for the clean-api-docs command to mark it as destructive, add a prominent warning that it can remove tracked documentation (specifically call out docs/api/_category_.json), and include a short recovery note showing the restore command (e.g., git restore docs/api/_category_.json) so maintainers know how to recover removed tracked files; modify the text around the clean-api-docs example to include this warning and the restore guidance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@gen-docs/README.md`:
- Around line 37-41: The README's description for the pnpm script clean-api-docs
is too mild; update the entry for the clean-api-docs command to mark it as
destructive, add a prominent warning that it can remove tracked documentation
(specifically call out docs/api/_category_.json), and include a short recovery
note showing the restore command (e.g., git restore docs/api/_category_.json) so
maintainers know how to recover removed tracked files; modify the text around
the clean-api-docs example to include this warning and the restore guidance.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f660653e-06eb-4df3-ac6c-7d1771dfb7e4
⛔ Files ignored due to path filters (1)
gen-docs/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
.github/workflows/docs-deploy.yml.gitignoredocs/api/_category_.jsongen-docs/README.mdgen-docs/docusaurus.config.tsgen-docs/package.json
✅ Files skipped from review due to trivial changes (4)
- .gitignore
- docs/api/category.json
- .github/workflows/docs-deploy.yml
- gen-docs/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
- gen-docs/docusaurus.config.ts
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
ebd0353 to
fb1a15b
Compare
Co-authored-by: 0xsysr3ll <0xsysr3ll@pm.me> Co-authored-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
fb1a15b to
9ef0f11
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@gen-docs/scripts/clean-api-docs.cjs`:
- Around line 11-15: The current try/catch around readFileSync(categoryPath,
'utf8') swallows all errors; modify the catch to accept an error object and only
suppress the error when it's a missing-file ENOENT (set categoryContent =
undefined), otherwise rethrow the error so real filesystem issues surface.
Locate the block using readFileSync, categoryPath and categoryContent and change
the catch to inspect error.code === 'ENOENT' (or equivalent) before deciding to
set categoryContent = undefined or throw.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4f0a9518-0f24-4f58-a7de-e3992c895297
⛔ Files ignored due to path filters (1)
gen-docs/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.github/workflows/docs-deploy.yml.github/workflows/test-docs.yml.gitignorebin/duplicate-detector/package.jsondocs/api/_category_.jsondocs/troubleshooting.mdxgen-docs/README.mdgen-docs/docusaurus.config.tsgen-docs/package.jsongen-docs/scripts/clean-api-docs.cjs
✅ Files skipped from review due to trivial changes (6)
- bin/duplicate-detector/package.json
- docs/api/category.json
- .gitignore
- .github/workflows/test-docs.yml
- docs/troubleshooting.mdx
- gen-docs/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- gen-docs/docusaurus.config.ts
Description
docusaurus-plugin-openapi-docsversion)The only thing I don't like much is that
pnpm clean-api-docs allcleans the entire API folder, and we want to keep the_category_.jsonfile. I didn't find a way to auto-generate it from the Docusaurus plugin.How Has This Been Tested?
n/a
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit
New Features
Documentation
Chores
CI