-
Notifications
You must be signed in to change notification settings - Fork 3
Request child pages using pagination #61
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
Conversation
markdown-confluence-sync v2.1.0
|
Check SPDX headers ✅ 242 files have valid headers. |
|
Check License Compliance ✅ There are 1437 dependencies with allowed licenses.
✅ Result: Valid licenses |
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.
Pull Request Overview
This PR adds a manual pagination workaround for retrieving child pages from Confluence when their number exceeds the default API limit, and updates mocks, tests, and versioning accordingly.
- Introduces a
_getChildPagesmethod inCustomConfluenceClientthat uses Axios and recursion to fetch all child pages. - Adds
getPageChildrenMiddlewareand related route/collection entries in mocks for both repositories. - Updates unit and component tests to cover paginated child page retrieval and error scenarios, plus version bumps and CHANGELOG entries.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| components/markdown-confluence-sync/package.json | Bumped version to 2.1.1 |
| components/markdown-confluence-sync/mocks/routes/Confluence.ts | Added getPageChildrenMiddleware and new route variants for pagination |
| components/markdown-confluence-sync/mocks/collections.ts | Included child-page routes in mock collections |
| components/markdown-confluence-sync/CHANGELOG.md | Added entry for fixing pages with >25 children |
| components/confluence-sync/test/unit/specs/confluence/CustomConfluenceClient.test.ts | Added tests for recursive child-page fetching and error handling |
| components/confluence-sync/test/component/specs/Sync.spec.ts | Updated component tests to assert paginated child-page requests |
| components/confluence-sync/src/confluence/CustomConfluenceClient.ts | Implemented _getChildPages for recursive pagination |
| components/confluence-sync/package.json | Bumped version to 2.0.2 |
| components/confluence-sync/mocks/routes/Confluence.ts | Added getPageChildrenMiddleware and pagination route variants |
| components/confluence-sync/mocks/collections.ts | Updated mock collections to include child-page variants |
| components/confluence-sync/CHANGELOG.md | Documented fix for child pages >25 issue |
| .github/workflows/publish.yml | Removed trailing whitespace |
| .github/ISSUE_TEMPLATE/BUG.yml | Updated bug template to allow selecting versions 1.x or 2.x |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Request child pages using pagination
Description
This PR implements a temporary workaround to retrieve all child pages from Confluence when their number exceeds the default API limit (25).
The current confluence.js library does not support pagination in the getContentChildren method, so this solution uses Axios to query the Confluence API directly with manual pagination.
closes #60
Agreement
Please check the following boxes after you have read and understood each item.
In case this is your first contribution to this project, you will also have to add a comment with the following text: "I have read the CLA Document and I hereby sign the CLA", otherwise the PR status will fail and our bot will request you to add it. Once you have signed it in a PR, you will not have to sign it again for future contributions.