Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git adr accept requires pre-staging unnecessarily #119

Open
mcaulifn opened this issue Jul 25, 2023 · 0 comments
Open

git adr accept requires pre-staging unnecessarily #119

mcaulifn opened this issue Jul 25, 2023 · 0 comments

Comments

@mcaulifn
Copy link

  • ADR Process Tool version: 0.19.0
  • Python version: 3.10.6
  • Operating System: Ubuntu 22.04

Description

In CI, I would like to mark a decision accepted, stage, and commit it.
pyadr accept adr.MD will mark it accepted. Based on the git adr commands, I would expect git adr accept adr.MD to accept, stage, and optionally commit.

What I Did

$ git adr accept -c decisions/XXXX-use-org.md
ADR 'decisions/XXXX-use-org.md' should be staged or committed first.

  PyadrGitAdrNotStagedOrCommittedError

  decisions/XXXX-use-org.md

  at ~/.local/pipx/venvs/pyadr/lib/python3.10/site-packages/pyadr/git/core.py:159 in _verify_adr_staged_or_committed
      155│     ) -> None:
      156│         if not (self._file_staged(path) or self._file_committed(path)):
      157│             if print_error_message:
      158│                 logger.error(f"ADR '{path}' should be staged or committed first.")
    → 159│             raise PyadrGitAdrNotStagedOrCommittedError(path)
      160│ 
      161│     def _verify_adr_staged(self, path: Path, print_error_message: bool = True) -> None:
      162│         if not (self._file_staged(path) or self._file_committed(path)):
      163│             if print_error_message:
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

No branches or pull requests

1 participant