add --reveal to cli for v2.30.0 and later#65
Open
csteinle wants to merge 1 commit into
Open
Conversation
dtpryce
requested changes
Sep 16, 2024
Collaborator
dtpryce
left a comment
There was a problem hiding this comment.
As mentioned in a comment I would actually go with making 2.30.0 the minimum supported version which would also need:
- README updated to reflect this
- https://github.com/wandera/1password-client/blob/233184937d93719233759edd350f3516da859fd7/install_op.py#L8 updated to reflect this
- testing to make sure all methods work with new client (follow basic steps in README is enough for me)
Happy to discuss, thanks for the great contribution. Pretty much there!
| :param account: 1Password account name (Optional, default=None) | ||
| :param password: password of 1Password account (Optional, default=None) | ||
| """ | ||
| cli_version = tuple(map(int, read_bash_return("op --version").split("."))) |
Collaborator
There was a problem hiding this comment.
We actually try not to do this and just fix the version in the install.py it gave us a lot more headaches trying to be fully backwards compatible and so we try to maintain and bump when we can. I know we suggest you can have any version over 2.0.0 in the README but if this new flag is a break change, let's update that suggestion :D
| (Optional, default=None which means all fields returned) | ||
| :return: Dictionary of the item with requested fields | ||
| """ | ||
| reveal = "--reveal" if cls.cli_version >= (2, 30, 0) else "" |
Collaborator
There was a problem hiding this comment.
If we go with my suggestions you won't need this and can just add --reveal to every op call that requires it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--revealwhen getting items if CLI is version v2.30.0 or later