Skip to content

[FEATURE] Allow configurable result limit for confluence spaces command #166

@rsk-ymst

Description

@rsk-ymst

Hi, thanks for this awesome project!


Is your feature request related to a problem? Please describe.
The confluence spaces command returns a fixed number of results (e.g. top 500), and this limit is not configurable.

/**
* Get all spaces
*/
async getSpaces() {
const response = await this.client.get('/space', {
params: {
limit: 500
}
});

In real-world environments with a large number of spaces, this may be confusing for users because spaces outside of the result set are not shown at all. As a result, users may think a space does not exist, even though it actually exists in Confluence.

Additionally, running the same command multiple times does not change the result, since the same fixed subset is always returned.

program
.command('spaces')
.description('List all Confluence spaces')

Also, the current command description (List all Confluence spaces) may be misleading, since the command does not actually list all spaces due to this limitation.


Describe the solution you'd like
Allow users to specify the number of results via an option, for example:

confluence spaces --limit 1000
  • Keep the default behavior (limit of 500) unchanged if not specified

Describe alternatives you've considered
If making the limit configurable is not desirable, clearly documenting the current limit and sorting behavior would still help users understand why some spaces are missing.

Additionally, updating the command description to reflect the current behavior (e.g. results may be limited) would help avoid confusion.

Alternatively, a flag such as --all could also be considered to explicitly retrieve all results.


Use case
In environments with many spaces, users may need to list and search across a broader set of spaces.

Without this feature, users may incorrectly assume that certain spaces do not exist, which can lead to confusion and inefficiency.


Implementation suggestions
Introduce a --limit option for the confluence spaces command.
I've summarized this in the following PR:

Happy to adjust the implementation based on your feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions