fix(post): exclude recycled posts from halo post list by default#7
fix(post): exclude recycled posts from halo post list by default#7
halo post list by default#7Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Co-authored-by: ruibaby <21301288+ruibaby@users.noreply.github.com>
halo post list
|
@copilot 能否增加一个 option,当我在命令中输入此 option 时,显示出所有的文章,包括回收站内的。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Co-authored-by: ruibaby <21301288+ruibaby@users.noreply.github.com>
Done in commit 40017e3. Added
|
halo post listhalo post list by default
halo post listwas returning all posts including those in the recycle bin (spec.deleted=true), polluting the output with trash content.Changes
src/commands/post/index.ts: PassfieldSelector: ["spec.deleted=false"]tolistPostsby default so recycled posts are excluded at the API level. Added--alloption that, when specified, omits the field selector so all posts including recycled ones are returned.src/commands/post/__test__/post-entry.spec.ts: Update list command test assertion to expect the newfieldSelector, and add a new test verifying--allomits the filter.Usage:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.