GitLab and Bitbucket publishers for server-side Git publishing#8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d3a883d5e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const folder = normalizeRepoPath(input.path); | ||
| const result = await gitLabRequest( | ||
| "GET", | ||
| `/projects/${projectSegment}/repository/tree?path=${encodeURIComponent(folder)}&ref=${encodeURIComponent(config.branch)}&recursive=true&per_page=100`, |
There was a problem hiding this comment.
Page through GitLab tree results
When a GitLab content directory has more than 100 entries, this request only returns the first page because it hard-codes per_page=100 and never follows GitLab's pagination headers, so the Studio posts list silently omits the remaining posts. The existing GitHub implementation recursively collects all returned entries, but this GitLab path stops after one page.
Useful? React with 👍 / 👎.
| entry.type === "blob" && | ||
| typeof entry.path === "string" && | ||
| (entry.path.endsWith(".md") || entry.path.endsWith(".mdx")), | ||
| ) |
There was a problem hiding this comment.
Include media files in GitLab listings
For GitLab-backed projects, /api/media calls this same listFiles method with mediaDir, but this filter only returns .md and .mdx blobs. Any uploaded images or PDFs in mediaDir are therefore omitted from Studio's media library even though the server-side media listing expects the publisher to return all files and filters supported media extensions afterward.
Useful? React with 👍 / 👎.
|
Closing retroactive split-stack review PR. Continuing from protected main with scoped feature PRs. |
PR 7 of 11. GitLab and Bitbucket publisher adapters.