Skip to content

CLIに非対話モードを追加する - #57

Open
yuji38kwmt wants to merge 1 commit into
mainfrom
feat/non-interactive
Open

yuji38kwmt wants to merge 1 commit into
mainfrom
feat/non-interactive

Conversation

@yuji38kwmt

Copy link
Copy Markdown
Collaborator

変更内容

  • 共通オプション --non_interactive を追加しました。認証情報が足りない場合は入力待ちに入らず、終了コード 2 を返します。
  • ページ更新は --yes で明示的に確認を省略できます。確認入力が必要な添付削除は、このモードでは終了します。

確認

  • 認証情報の不足、環境変数と引数の併用、書き込み時の確認をテストしました。
  • Ruff、mypy、pytest を実行しました。

Copilot AI balanced review requested due to automatic review settings November 26, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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

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