Skip to content

Conversation

JGProg
Copy link

@JGProg JGProg commented Jun 6, 2025

Summary

This pull request enhances the existing !contents directive by adding a new optional argument: -t, allowing users to filter listed pages based on the Suites property.


Motivation

In many projects, the same suite structure is reused across multiple contexts or products (e.g. Product A, Product B). However, some pages are only relevant to a specific product. Until now, there was no way to filter the !contents listing dynamically by tag.

This change adds that capability.


New behavior: -t option

You can now use !contents like this:

!contents -R2 -tProductA

@JGProg
Copy link
Author

JGProg commented Jun 6, 2025

@fhoeben do you mind reviewing? thanks :)

@JGProg JGProg changed the title Enhance !contents to support filtering by Suites tag using -tag / -t option Enhance !contents to support filtering by Suites tag using -t option Jun 6, 2025
Copy link
Collaborator

@fhoeben fhoeben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you also add some tests and some documentation (as a wiki page)?

import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.*;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use .* imports

@JGProg
Copy link
Author

JGProg commented Jun 24, 2025

it's ok @fhoeben :)
I creat two unit test and add documentation :)

@JGProg JGProg force-pushed the jgia/FilterContentByTags branch 2 times, most recently from d87a23b to 86d3662 Compare June 25, 2025 14:59
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