community.general icon indicating copy to clipboard operation
community.general copied to clipboard

feat(lookup/bitwarden): add support for fetching all items from a collection

Open neilime opened this issue 1 year ago • 4 comments

SUMMARY

At the moment the lookup plugin allows to fetch items matching a mandatory search value. It will be useful to retrieve the full item list for a given collection.

This PR allows to fetch all items of a given collection id, by letting search_value optional when collection_id is provided.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

community.general.bitwarden - lookup

ADDITIONAL INFORMATION
  • bw cli documentation: https://bitwarden.com/help/cli/#list

neilime avatar Feb 23 '24 15:02 neilime

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/bitwarden.py:134:38: E231: missing whitespace after ','

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/bitwarden.py:134:38: E231: missing whitespace after ','

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/bitwarden.py:134:38: E231: missing whitespace after ','

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/bitwarden.py:134:38: E231: missing whitespace after ','

click here for bot help

ansibullbot avatar Feb 23 '24 15:02 ansibullbot

cc @lungj click here for bot help

ansibullbot avatar Feb 23 '24 15:02 ansibullbot

Please note that this PR now has a conflict.

felixfontein avatar Feb 25 '24 19:02 felixfontein

If nobody objects, I'll merge this in ~a week.

felixfontein avatar Mar 17 '24 16:03 felixfontein

Backport to stable-8: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-8/f5fa16c881b94f87e19b4d75b300db3b6f72cd20/pr-8013

Backported as https://github.com/ansible-collections/community.general/pull/8140

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.

patchback[bot] avatar Mar 24 '24 17:03 patchback[bot]

@neilime thanks for your contribution!

felixfontein avatar Mar 24 '24 17:03 felixfontein