Skip to content

[Confluence] get_all_pages_from_space: honor content_type, skip None params - #1720

Merged
gonchik merged 1 commit into
atlassian-api:masterfrom
star7js:fix/confluence-pages-from-space-content-type
Nov 15, 2026
Merged

gonchik merged 1 commit into
atlassian-api:masterfrom
star7js:fix/confluence-pages-from-space-content-type

Conversation

@star7js

@star7js star7js commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Refs #1708

#1708 had two bugs behind it. The first hid the second.

1. Already fixed on master (784d1d3), not yet released. In 5.0.5 the Cloud method requested content instead of rest/api/content, so the call returned nothing. That is the empty loop in the report.

2. Still on master, fixed here. With the path corrected, the same call from the report:

get_all_pages_from_space(space, start=0, limit=50, status=None, expand="version", content_type="blogpost")

requests

rest/api/content?spaceKey=KEY&type=page&start=0&limit=50&status=None&expand=version&content_type=blogpost

  • content_type is ignored, so a request for blog posts returns pages
  • status=None is sent as a literal query parameter

Nothing errors, which is why it went unnoticed: the reporter never got results back to see they were the wrong type.

Now content_type selects the type and parameters set to None are not sent, on Server and Cloud. The docs describe the generator return.

Tests: one new test each for Server and Cloud; both fail without the change.

…ne parameters

get_all_pages_from_space(space, status=None, expand=..., content_type="blogpost")
sent type=page along with content_type=blogpost and status=None as literal
query parameters, so a request for blog posts asked for pages. content_type
now selects the type, and parameters set to None are not sent, on both
Server and Cloud. The docs describe the generator return.

Refs atlassian-api#1708
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.49%. Comparing base (4decdd8) to head (eb6e74b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1720   +/-   ##
=======================================
  Coverage   65.48%   65.49%           
=======================================
  Files         107      107           
  Lines       19436    19440    +4     
  Branches     2129     2129           
=======================================
+ Hits        12728    12732    +4     
  Misses       6001     6001           
  Partials      707      707           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gonchik
gonchik merged commit 05b9cfa into atlassian-api:master Nov 15, 2026
11 checks passed
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