Repository navigation
CLIに非対話モードを追加する - #57
Open
yuji38kwmt wants to merge 1 commit into
Open
yuji38kwmt wants to merge 1 commit into
yuji38kwmt wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the opt-in non-interactive CLI changes.
No open issues 🎉
What changed in this PR
Adds an opt-in non-interactive mode to the Confluence CLI for scripted use, avoiding credential prompts and enforcing explicit confirmation requirements.
Changes:
- Adds
--non_interactive, resolving credentials from arguments and environment variables, with arguments taking precedence. - Returns exit code 2 for missing credentials, page updates without
--yes, and attachment deletion in non-interactive mode. - Adds tests and usage documentation for the new behavior.
| File | Description |
|---|---|
tests/test_non_interactive.py |
Tests missing credentials, argument precedence, and write-operation restrictions. |
docs/user_guide/getting_started.rst |
Documents non-interactive usage and confirmation requirements. |
confluence/page/update_page.py |
Requires --yes for non-interactive page updates. |
confluence/common/cli.py |
Adds the shared option, credential validation, and command-line error type. |
confluence/attachment/delete_attachment.py |
Rejects non-interactive attachment deletion before creating an API client. |
confluence/__main__.py |
Reports command-line errors to standard error with exit code 2. |
Review effort: Balanced
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.
変更内容
--non_interactiveを追加しました。認証情報が足りない場合は入力待ちに入らず、終了コード 2 を返します。--yesで明示的に確認を省略できます。確認入力が必要な添付削除は、このモードでは終了します。確認