scitex-git 0.1.3__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {scitex_git-0.1.3/src/scitex_git.egg-info → scitex_git-0.3.0}/PKG-INFO +64 -21
  2. {scitex_git-0.1.3 → scitex_git-0.3.0}/README.md +61 -19
  3. {scitex_git-0.1.3 → scitex_git-0.3.0}/pyproject.toml +3 -2
  4. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/__init__.py +24 -1
  5. scitex_git-0.3.0/src/scitex_git/_gh_secrets.py +220 -0
  6. scitex_git-0.3.0/src/scitex_git/_skills/scitex-git/01_installation.md +46 -0
  7. scitex_git-0.3.0/src/scitex_git/_skills/scitex-git/02_quick-start.md +58 -0
  8. scitex_git-0.3.0/src/scitex_git/_skills/scitex-git/03_python-api.md +78 -0
  9. scitex_git-0.3.0/src/scitex_git/_skills/scitex-git/SKILL.md +30 -0
  10. {scitex_git-0.1.3 → scitex_git-0.3.0/src/scitex_git.egg-info}/PKG-INFO +64 -21
  11. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git.egg-info/SOURCES.txt +4 -0
  12. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git.egg-info/requires.txt +1 -0
  13. scitex_git-0.1.3/src/scitex_git/_skills/scitex-git/SKILL.md +0 -25
  14. {scitex_git-0.1.3 → scitex_git-0.3.0}/LICENSE +0 -0
  15. {scitex_git-0.1.3 → scitex_git-0.3.0}/setup.cfg +0 -0
  16. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_branch.py +0 -0
  17. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_clone.py +0 -0
  18. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_commit.py +0 -0
  19. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_constants.py +0 -0
  20. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_init.py +0 -0
  21. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_remote.py +0 -0
  22. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_result.py +0 -0
  23. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_retry.py +0 -0
  24. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_types.py +0 -0
  25. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_utils.py +0 -0
  26. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_validation.py +0 -0
  27. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_vendor_sh.py +0 -0
  28. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git/_workflow.py +0 -0
  29. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git.egg-info/dependency_links.txt +0 -0
  30. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git.egg-info/entry_points.txt +0 -0
  31. {scitex_git-0.1.3 → scitex_git-0.3.0}/src/scitex_git.egg-info/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scitex-git
3
- Version: 0.1.3
4
- Summary: Git operations and utilities (clone, branch, commit, retry, remote helpers) — standalone module from the SciTeX ecosystem
3
+ Version: 0.3.0
4
+ Summary: Git + GitHub Actions utilities (clone, branch, commit, retry, remote helpers, gh secrets/variables with SHA256 sidecar) — standalone module from the SciTeX ecosystem
5
5
  Author-email: Yusuke Watanabe <ywatanabe@scitex.ai>
6
6
  License-Expression: AGPL-3.0-only
7
7
  Project-URL: Homepage, https://github.com/ywatanabe1989/scitex-git
@@ -25,6 +25,7 @@ Provides-Extra: dev
25
25
  Requires-Dist: pytest; extra == "dev"
26
26
  Requires-Dist: pytest-cov; extra == "dev"
27
27
  Requires-Dist: ruff; extra == "dev"
28
+ Requires-Dist: scitex-dev>=0.11.7; extra == "dev"
28
29
  Provides-Extra: docs
29
30
  Requires-Dist: sphinx>=7.0; extra == "docs"
30
31
  Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
@@ -37,16 +38,6 @@ Dynamic: license-file
37
38
 
38
39
  # scitex-git
39
40
 
40
- <!-- scitex-badges:start -->
41
- [![PyPI](https://img.shields.io/pypi/v/scitex-git.svg)](https://pypi.org/project/scitex-git/)
42
- [![Python](https://img.shields.io/pypi/pyversions/scitex-git.svg)](https://pypi.org/project/scitex-git/)
43
- [![Tests](https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml)
44
- [![Install Test](https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml)
45
- [![Coverage](https://codecov.io/gh/ywatanabe1989/scitex-git/graph/badge.svg)](https://codecov.io/gh/ywatanabe1989/scitex-git)
46
- [![Docs](https://readthedocs.org/projects/scitex-git/badge/?version=latest)](https://scitex-git.readthedocs.io/en/latest/)
47
- [![License: AGPL v3](https://img.shields.io/badge/license-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
48
- <!-- scitex-badges:end -->
49
-
50
41
  <p align="center">
51
42
  <a href="https://scitex.ai">
52
43
  <img src="docs/scitex-logo-blue-cropped.png" alt="SciTeX" width="400">
@@ -59,6 +50,18 @@ Dynamic: license-file
59
50
  <a href="https://scitex-git.readthedocs.io/">Full Documentation</a> · <code>pip install scitex-git</code>
60
51
  </p>
61
52
 
53
+ <!-- scitex-badges:start -->
54
+ <p align="center">
55
+ <a href="https://pypi.org/project/scitex-git/"><img src="https://img.shields.io/pypi/v/scitex-git.svg" alt="PyPI"></a>
56
+ <a href="https://pypi.org/project/scitex-git/"><img src="https://img.shields.io/pypi/pyversions/scitex-git.svg" alt="Python"></a>
57
+ <a href="https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml"><img src="https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml/badge.svg" alt="Tests"></a>
58
+ <a href="https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml"><img src="https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml/badge.svg" alt="Install Test"></a>
59
+ <a href="https://codecov.io/gh/ywatanabe1989/scitex-git"><img src="https://codecov.io/gh/ywatanabe1989/scitex-git/graph/badge.svg" alt="Coverage"></a>
60
+ <a href="https://scitex-git.readthedocs.io/en/latest/"><img src="https://readthedocs.org/projects/scitex-git/badge/?version=latest" alt="Docs"></a>
61
+ <a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/license-AGPL_v3-blue.svg" alt="License: AGPL v3"></a>
62
+ </p>
63
+ <!-- scitex-badges:end -->
64
+
62
65
  ---
63
66
 
64
67
  ## Installation
@@ -67,19 +70,29 @@ Dynamic: license-file
67
70
  pip install scitex-git
68
71
  ```
69
72
 
70
- ## Quick Start
73
+ ## Architecture
71
74
 
72
- ```python
73
- import scitex_git as sxg
74
-
75
- sxg.clone_repo("https://github.com/foo/bar", "./bar")
76
- sxg.git_add_all("./bar")
77
- sxg.git_commit("./bar", message="initial")
78
75
  ```
76
+ scitex_git/
77
+ ├── _clone.py ← clone_repo, ls_remote, get_remote_url
78
+ ├── _init.py ← git_init, init_git_repo, find_parent_git
79
+ ├── _commit.py ← git_add_all, git_commit
80
+ ├── _branch.py ← checkout_new_branch, branch_rename, setup_branches
81
+ ├── _remote.py ← remote-URL helpers, head-hash queries
82
+ ├── _retry.py ← @git_retry decorator (transient-error backoff)
83
+ ├── _validation.py ← repo-state guards
84
+ ├── _workflow.py ← high-level multi-step flows
85
+ ├── _vendor_sh.py ← ~70-LOC subprocess wrapper (replaces scitex.sh)
86
+ └── _skills/ ← agent-facing skill pages
87
+ ```
88
+
89
+ Pure-stdlib core. `_vendor_sh.py` is intentionally tiny so the package
90
+ has no `scitex.*` runtime dependency. The umbrella `scitex.git` import
91
+ resolves through a `sys.modules` bridge.
79
92
 
80
93
  ## 1 Interfaces
81
94
 
82
- <details>
95
+ <details open>
83
96
  <summary><strong>Python API</strong></summary>
84
97
 
85
98
  <br>
@@ -119,6 +132,34 @@ def maybe_flaky_operation(): ...
119
132
 
120
133
  </details>
121
134
 
135
+ ## Demo
136
+
137
+ ```mermaid
138
+ flowchart LR
139
+ A["scitex_git.clone_repo<br/>(url, dest)"] --> B["@git_retry<br/>(transient errors)"]
140
+ B --> C["repo on disk"]
141
+ C --> D["git_add_all + git_commit"]
142
+ D --> E["checkout_new_branch<br/>+ branch_rename"]
143
+ E --> F["get_remote_url /<br/>get_head_hash"]
144
+ ```
145
+
146
+ ```python
147
+ >>> import scitex_git as sxg
148
+ >>> sxg.clone_repo("https://github.com/foo/bar", "./bar")
149
+ >>> sxg.git_add_all("./bar")
150
+ >>> sxg.git_commit("./bar", message="initial")
151
+ ```
152
+
153
+ ## Quick Start
154
+
155
+ ```python
156
+ import scitex_git as sxg
157
+
158
+ sxg.clone_repo("https://github.com/foo/bar", "./bar")
159
+ sxg.git_add_all("./bar")
160
+ sxg.git_commit("./bar", message="initial")
161
+ ```
162
+
122
163
  ## Status
123
164
 
124
165
  Standalone fork of `scitex.git`. `scitex.logging.getLogger` is replaced by stdlib
@@ -133,7 +174,9 @@ The umbrella package's `scitex.git` import path is preserved via a
133
174
 
134
175
  ## Part of SciTeX
135
176
 
136
- `scitex-git` is part of [**SciTeX**](https://scitex.ai).
177
+ `scitex-git` is part of [**SciTeX**](https://scitex.ai). Install via
178
+ the umbrella with `pip install scitex[git]` to use as
179
+ `scitex.git` (Python) or `scitex git ...` (CLI).
137
180
 
138
181
  >Four Freedoms for Research
139
182
  >
@@ -1,15 +1,5 @@
1
1
  # scitex-git
2
2
 
3
- <!-- scitex-badges:start -->
4
- [![PyPI](https://img.shields.io/pypi/v/scitex-git.svg)](https://pypi.org/project/scitex-git/)
5
- [![Python](https://img.shields.io/pypi/pyversions/scitex-git.svg)](https://pypi.org/project/scitex-git/)
6
- [![Tests](https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml)
7
- [![Install Test](https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml)
8
- [![Coverage](https://codecov.io/gh/ywatanabe1989/scitex-git/graph/badge.svg)](https://codecov.io/gh/ywatanabe1989/scitex-git)
9
- [![Docs](https://readthedocs.org/projects/scitex-git/badge/?version=latest)](https://scitex-git.readthedocs.io/en/latest/)
10
- [![License: AGPL v3](https://img.shields.io/badge/license-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
11
- <!-- scitex-badges:end -->
12
-
13
3
  <p align="center">
14
4
  <a href="https://scitex.ai">
15
5
  <img src="docs/scitex-logo-blue-cropped.png" alt="SciTeX" width="400">
@@ -22,6 +12,18 @@
22
12
  <a href="https://scitex-git.readthedocs.io/">Full Documentation</a> · <code>pip install scitex-git</code>
23
13
  </p>
24
14
 
15
+ <!-- scitex-badges:start -->
16
+ <p align="center">
17
+ <a href="https://pypi.org/project/scitex-git/"><img src="https://img.shields.io/pypi/v/scitex-git.svg" alt="PyPI"></a>
18
+ <a href="https://pypi.org/project/scitex-git/"><img src="https://img.shields.io/pypi/pyversions/scitex-git.svg" alt="Python"></a>
19
+ <a href="https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml"><img src="https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml/badge.svg" alt="Tests"></a>
20
+ <a href="https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml"><img src="https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml/badge.svg" alt="Install Test"></a>
21
+ <a href="https://codecov.io/gh/ywatanabe1989/scitex-git"><img src="https://codecov.io/gh/ywatanabe1989/scitex-git/graph/badge.svg" alt="Coverage"></a>
22
+ <a href="https://scitex-git.readthedocs.io/en/latest/"><img src="https://readthedocs.org/projects/scitex-git/badge/?version=latest" alt="Docs"></a>
23
+ <a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/license-AGPL_v3-blue.svg" alt="License: AGPL v3"></a>
24
+ </p>
25
+ <!-- scitex-badges:end -->
26
+
25
27
  ---
26
28
 
27
29
  ## Installation
@@ -30,19 +32,29 @@
30
32
  pip install scitex-git
31
33
  ```
32
34
 
33
- ## Quick Start
35
+ ## Architecture
34
36
 
35
- ```python
36
- import scitex_git as sxg
37
-
38
- sxg.clone_repo("https://github.com/foo/bar", "./bar")
39
- sxg.git_add_all("./bar")
40
- sxg.git_commit("./bar", message="initial")
41
37
  ```
38
+ scitex_git/
39
+ ├── _clone.py ← clone_repo, ls_remote, get_remote_url
40
+ ├── _init.py ← git_init, init_git_repo, find_parent_git
41
+ ├── _commit.py ← git_add_all, git_commit
42
+ ├── _branch.py ← checkout_new_branch, branch_rename, setup_branches
43
+ ├── _remote.py ← remote-URL helpers, head-hash queries
44
+ ├── _retry.py ← @git_retry decorator (transient-error backoff)
45
+ ├── _validation.py ← repo-state guards
46
+ ├── _workflow.py ← high-level multi-step flows
47
+ ├── _vendor_sh.py ← ~70-LOC subprocess wrapper (replaces scitex.sh)
48
+ └── _skills/ ← agent-facing skill pages
49
+ ```
50
+
51
+ Pure-stdlib core. `_vendor_sh.py` is intentionally tiny so the package
52
+ has no `scitex.*` runtime dependency. The umbrella `scitex.git` import
53
+ resolves through a `sys.modules` bridge.
42
54
 
43
55
  ## 1 Interfaces
44
56
 
45
- <details>
57
+ <details open>
46
58
  <summary><strong>Python API</strong></summary>
47
59
 
48
60
  <br>
@@ -82,6 +94,34 @@ def maybe_flaky_operation(): ...
82
94
 
83
95
  </details>
84
96
 
97
+ ## Demo
98
+
99
+ ```mermaid
100
+ flowchart LR
101
+ A["scitex_git.clone_repo<br/>(url, dest)"] --> B["@git_retry<br/>(transient errors)"]
102
+ B --> C["repo on disk"]
103
+ C --> D["git_add_all + git_commit"]
104
+ D --> E["checkout_new_branch<br/>+ branch_rename"]
105
+ E --> F["get_remote_url /<br/>get_head_hash"]
106
+ ```
107
+
108
+ ```python
109
+ >>> import scitex_git as sxg
110
+ >>> sxg.clone_repo("https://github.com/foo/bar", "./bar")
111
+ >>> sxg.git_add_all("./bar")
112
+ >>> sxg.git_commit("./bar", message="initial")
113
+ ```
114
+
115
+ ## Quick Start
116
+
117
+ ```python
118
+ import scitex_git as sxg
119
+
120
+ sxg.clone_repo("https://github.com/foo/bar", "./bar")
121
+ sxg.git_add_all("./bar")
122
+ sxg.git_commit("./bar", message="initial")
123
+ ```
124
+
85
125
  ## Status
86
126
 
87
127
  Standalone fork of `scitex.git`. `scitex.logging.getLogger` is replaced by stdlib
@@ -96,7 +136,9 @@ The umbrella package's `scitex.git` import path is preserved via a
96
136
 
97
137
  ## Part of SciTeX
98
138
 
99
- `scitex-git` is part of [**SciTeX**](https://scitex.ai).
139
+ `scitex-git` is part of [**SciTeX**](https://scitex.ai). Install via
140
+ the umbrella with `pip install scitex[git]` to use as
141
+ `scitex.git` (Python) or `scitex git ...` (CLI).
100
142
 
101
143
  >Four Freedoms for Research
102
144
  >
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scitex-git"
7
- version = "0.1.3"
8
- description = "Git operations and utilities (clone, branch, commit, retry, remote helpers) — standalone module from the SciTeX ecosystem"
7
+ version = "0.3.0"
8
+ description = "Git + GitHub Actions utilities (clone, branch, commit, retry, remote helpers, gh secrets/variables with SHA256 sidecar) — standalone module from the SciTeX ecosystem"
9
9
  readme = "README.md"
10
10
  license = "AGPL-3.0-only"
11
11
  requires-python = ">=3.9"
@@ -31,6 +31,7 @@ dev = [
31
31
  "pytest",
32
32
  "pytest-cov",
33
33
  "ruff",
34
+ "scitex-dev>=0.11.7",
34
35
  ]
35
36
  docs = [
36
37
  "sphinx>=7.0",
@@ -6,7 +6,9 @@
6
6
  from __future__ import annotations
7
7
 
8
8
  try:
9
- from importlib.metadata import version as _v, PackageNotFoundError
9
+ from importlib.metadata import PackageNotFoundError
10
+ from importlib.metadata import version as _v
11
+
10
12
  try:
11
13
  __version__ = _v("scitex-git")
12
14
  except PackageNotFoundError:
@@ -17,6 +19,17 @@ except ImportError: # pragma: no cover — only on ancient Pythons
17
19
  from ._branch import git_branch_rename, git_checkout_new_branch
18
20
  from ._clone import clone_repo, git_init
19
21
  from ._commit import git_add_all, git_commit
22
+ from ._gh_secrets import (
23
+ GhSecretError,
24
+ format_age,
25
+ get_secret_metadata,
26
+ get_variable,
27
+ list_secrets,
28
+ set_secret,
29
+ set_secret_with_sha_sidecar,
30
+ set_variable,
31
+ sha256_hex,
32
+ )
20
33
  from ._init import create_child_git, find_parent_git, init_git_repo, remove_child_git
21
34
  from ._remote import get_head_hash, get_remote_url, is_cloned_from, ls_remote
22
35
  from ._retry import git_retry
@@ -40,6 +53,16 @@ __all__ = [
40
53
  "get_head_hash",
41
54
  "setup_branches",
42
55
  "git_retry",
56
+ # GitHub Actions secrets / variables
57
+ "GhSecretError",
58
+ "set_secret",
59
+ "list_secrets",
60
+ "get_secret_metadata",
61
+ "set_variable",
62
+ "get_variable",
63
+ "set_secret_with_sha_sidecar",
64
+ "sha256_hex",
65
+ "format_age",
43
66
  ]
44
67
 
45
68
  # EOF
@@ -0,0 +1,220 @@
1
+ #!/usr/bin/env python3
2
+ # File: /home/ywatanabe/proj/scitex-git/src/scitex_git/_gh_secrets.py
3
+
4
+ """GitHub Actions secrets / variables — thin wrappers around ``gh`` CLI.
5
+
6
+ The GitHub Actions REST API (and ``gh secret``) is **write-only** for
7
+ secret values: you can list names + ``updated_at``, but never read a
8
+ value back. This module bundles the everyday read/write primitives any
9
+ "rotate the CI key" workflow needs, plus a SHA256 sidecar pattern to
10
+ detect drift between local and remote without exposing the secret:
11
+
12
+ * :func:`set_secret` / :func:`list_secrets` /
13
+ :func:`get_secret_metadata` — direct ``gh secret`` wrappers.
14
+ * :func:`set_variable` / :func:`get_variable` — ``gh variable``
15
+ wrappers (variables are world-readable; suitable for non-sensitive
16
+ fingerprints, never for token material).
17
+ * :func:`set_secret_with_sha_sidecar` — pushes the secret AND a
18
+ SHA256 fingerprint to a same-name ``…_SHA256`` repo variable so a
19
+ later ``get_variable`` call lets the operator tell whether the
20
+ GitHub-side secret matches the local one. Hash is irreversible.
21
+ * :func:`format_age` — render an ISO-8601 ``updated_at`` as a
22
+ human-readable single-unit age (``15min`` / ``2.4d``) for CLI
23
+ reports.
24
+ * :func:`sha256_hex` — same hashing function the sidecar uses, so
25
+ callers can compute a local fingerprint to compare against
26
+ :func:`get_variable`.
27
+
28
+ The ``gh`` CLI must be authenticated. Each helper raises
29
+ :class:`GhSecretError` on subprocess failure with the underlying stderr
30
+ attached, so callers can surface a clean message rather than a stack
31
+ trace.
32
+ """
33
+
34
+ from __future__ import annotations
35
+
36
+ import hashlib
37
+ import json
38
+ import subprocess
39
+ from datetime import datetime, timezone
40
+ from logging import getLogger
41
+
42
+ logger = getLogger(__name__)
43
+
44
+ __all__ = [
45
+ "GhSecretError",
46
+ "set_secret",
47
+ "list_secrets",
48
+ "get_secret_metadata",
49
+ "set_variable",
50
+ "get_variable",
51
+ "set_secret_with_sha_sidecar",
52
+ "format_age",
53
+ "sha256_hex",
54
+ ]
55
+
56
+
57
+ class GhSecretError(RuntimeError):
58
+ """Raised when a ``gh`` subprocess returns non-zero."""
59
+
60
+
61
+ def _run(argv: list[str], *, stdin: str | None = None) -> str:
62
+ """Run ``argv`` and return stdout. Raise :class:`GhSecretError` on failure."""
63
+ proc = subprocess.run(
64
+ argv,
65
+ input=stdin,
66
+ text=True,
67
+ capture_output=True,
68
+ )
69
+ if proc.returncode != 0:
70
+ msg = proc.stderr.strip() or proc.stdout.strip() or "unknown error"
71
+ raise GhSecretError(f"{' '.join(argv[:3])}…: {msg}")
72
+ return proc.stdout
73
+
74
+
75
+ # ---------------------------------------------------------------------------
76
+ # Secrets
77
+ # ---------------------------------------------------------------------------
78
+
79
+
80
+ def set_secret(repo: str, name: str, value: str) -> None:
81
+ """Push ``value`` into the Actions secret ``name`` for ``repo``.
82
+
83
+ ``repo`` follows the ``owner/repo`` form. Idempotent — creates if
84
+ missing, updates otherwise.
85
+ """
86
+ # ``gh secret set`` reads from stdin when ``--body`` is omitted.
87
+ # Earlier we passed ``--body -`` thinking ``-`` meant stdin; gh
88
+ # actually stored the literal one-byte value ``-``, silently
89
+ # truncating the secret. Bug surfaced as in-CI ``$SECRET`` length
90
+ # 1 with sha256 mismatching the local file's hash.
91
+ _run(["gh", "secret", "set", name, "-R", repo], stdin=value)
92
+
93
+
94
+ def list_secrets(repo: str) -> dict[str, str]:
95
+ """Return ``{secret_name: updated_at_iso}`` for the repo.
96
+
97
+ Pagination is honoured (``--paginate``) so this scales beyond
98
+ GitHub's 100-secret default page size.
99
+ """
100
+ raw = _run(["gh", "api", f"repos/{repo}/actions/secrets", "--paginate"])
101
+ payload = json.loads(raw)
102
+ return {s["name"]: s["updated_at"] for s in payload.get("secrets", [])}
103
+
104
+
105
+ def get_secret_metadata(repo: str, name: str) -> dict | None:
106
+ """Return the secret's metadata dict (name / created_at / updated_at), or None.
107
+
108
+ GitHub never exposes the value itself — that's the whole point of
109
+ Actions secrets. Use :func:`get_variable` against a SHA sidecar
110
+ (see :func:`set_secret_with_sha_sidecar`) if you need to detect
111
+ value drift.
112
+ """
113
+ proc = subprocess.run(
114
+ ["gh", "api", f"repos/{repo}/actions/secrets/{name}"],
115
+ text=True,
116
+ capture_output=True,
117
+ )
118
+ if proc.returncode != 0:
119
+ return None
120
+ try:
121
+ return json.loads(proc.stdout)
122
+ except json.JSONDecodeError:
123
+ return None
124
+
125
+
126
+ # ---------------------------------------------------------------------------
127
+ # Variables (world-readable)
128
+ # ---------------------------------------------------------------------------
129
+
130
+
131
+ def set_variable(repo: str, name: str, value: str) -> None:
132
+ """Create-or-update an Actions variable. Idempotent.
133
+
134
+ Variables are visible to anyone with repo read access. Use this
135
+ for non-sensitive metadata (e.g. SHA256 fingerprints of secrets,
136
+ feature flags). NEVER store token material here.
137
+ """
138
+ _run(["gh", "variable", "set", name, "-R", repo, "--body", value])
139
+
140
+
141
+ def get_variable(repo: str, name: str) -> str | None:
142
+ """Return the variable's value, or None if absent."""
143
+ proc = subprocess.run(
144
+ ["gh", "api", f"repos/{repo}/actions/variables/{name}"],
145
+ text=True,
146
+ capture_output=True,
147
+ )
148
+ if proc.returncode != 0:
149
+ return None
150
+ try:
151
+ return json.loads(proc.stdout).get("value")
152
+ except json.JSONDecodeError:
153
+ return None
154
+
155
+
156
+ # ---------------------------------------------------------------------------
157
+ # SHA256 sidecar — secret-drift detection without exposing the value
158
+ # ---------------------------------------------------------------------------
159
+
160
+
161
+ def sha256_hex(value: str) -> str:
162
+ """Return the SHA256 hex digest of ``value`` (UTF-8)."""
163
+ return hashlib.sha256(value.encode("utf-8")).hexdigest()
164
+
165
+
166
+ def set_secret_with_sha_sidecar(
167
+ repo: str, name: str, value: str, *, sidecar_suffix: str = "_SHA256"
168
+ ) -> str:
169
+ """Push the secret AND its SHA256 fingerprint as a public variable.
170
+
171
+ Returns the SHA256 hex digest so the caller can show it in CLI
172
+ output. The sidecar variable is named ``{name}{sidecar_suffix}`` and
173
+ holds the irreversible hash; later
174
+ ``get_variable(repo, f"{name}{sidecar_suffix}")`` lets you tell
175
+ whether the GitHub-side secret matches a local value (compare with
176
+ ``sha256_hex(local_value)``).
177
+
178
+ The hash itself is not sensitive — it cannot be reversed to the
179
+ original token without a brute-force search of the OAuth/api-key
180
+ namespace, which is computationally infeasible. It IS visible to
181
+ repo readers, so don't use the sidecar for tokens whose mere
182
+ existence is sensitive (the hash leaks "this token was rotated at
183
+ {time} to a value with hash {h}" but never the value).
184
+ """
185
+ digest = sha256_hex(value)
186
+ set_secret(repo, name, value)
187
+ set_variable(repo, f"{name}{sidecar_suffix}", digest)
188
+ return digest
189
+
190
+
191
+ # ---------------------------------------------------------------------------
192
+ # Display helpers
193
+ # ---------------------------------------------------------------------------
194
+
195
+
196
+ def format_age(updated_iso: str | None) -> str:
197
+ """Render an ISO-8601 timestamp as a single-unit human age.
198
+
199
+ Picks the largest unit that gives a readable number: seconds for
200
+ very fresh rotations, then minutes, hours, days. Mirrors the
201
+ ``git relative_date`` style — a single value + unit, no compound
202
+ "1d 4h" form. Returns ``"?"`` for ``None`` input.
203
+
204
+ >>> format_age(None)
205
+ '?'
206
+ """
207
+ if not updated_iso:
208
+ return "?"
209
+ dt = datetime.fromisoformat(updated_iso.replace("Z", "+00:00"))
210
+ seconds = (datetime.now(timezone.utc) - dt).total_seconds()
211
+ if seconds < 60:
212
+ return f"{int(seconds)}s"
213
+ if seconds < 3600:
214
+ return f"{int(seconds / 60)}min"
215
+ if seconds < 86400:
216
+ return f"{seconds / 3600:.1f}h"
217
+ return f"{seconds / 86400:.1f}d"
218
+
219
+
220
+ # EOF
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: |
3
+ [TOPIC] Installation
4
+ [DETAILS] pip install scitex-git. Pure-Python wrapper around the system `git` binary; you must have `git` installed on PATH.
5
+ tags: [scitex-git-installation]
6
+ ---
7
+
8
+ # Installation
9
+
10
+ ## Standard
11
+
12
+ ```bash
13
+ pip install scitex-git
14
+ ```
15
+
16
+ Pure-Python; no Python deps. Wraps the system `git` binary via `subprocess`.
17
+
18
+ ## Required system tool
19
+
20
+ | Tool | Install |
21
+ |--------|----------------------------------------------------------|
22
+ | `git` | `apt install git` / `brew install git` / https://git-scm.com/ |
23
+
24
+ ```bash
25
+ git --version # must be on PATH
26
+ ```
27
+
28
+ ## Verify
29
+
30
+ ```bash
31
+ python -c "import scitex_git; print(scitex_git.__version__)"
32
+ python -c "from scitex_git import clone_repo, git_init, git_commit, git_retry; print('ok')"
33
+ ```
34
+
35
+ ## Editable install (development)
36
+
37
+ ```bash
38
+ git clone https://github.com/ywatanabe1989/scitex-git
39
+ cd scitex-git
40
+ pip install -e .
41
+ ```
42
+
43
+ ## Used by
44
+
45
+ Pulled in transitively by ecosystem packages that need programmatic git
46
+ operations (e.g. scitex-cloud's three-way sync, project scaffolding).
@@ -0,0 +1,58 @@
1
+ ---
2
+ description: |
3
+ [TOPIC] Quick start
4
+ [DETAILS] Clone, init, commit, branch, retry — the smallest useful examples for the most-used helpers.
5
+ tags: [scitex-git-quick-start]
6
+ ---
7
+
8
+ # Quick Start
9
+
10
+ ## Clone
11
+
12
+ ```python
13
+ from scitex_git import clone_repo
14
+
15
+ clone_repo("https://github.com/u/r.git", dest="/tmp/r")
16
+ ```
17
+
18
+ ## Init + first commit
19
+
20
+ ```python
21
+ from scitex_git import git_init, git_add_all, git_commit
22
+
23
+ git_init("/tmp/new-repo")
24
+ git_add_all("/tmp/new-repo")
25
+ git_commit("/tmp/new-repo", message="initial commit")
26
+ ```
27
+
28
+ ## Branches
29
+
30
+ ```python
31
+ from scitex_git import git_checkout_new_branch, git_branch_rename, setup_branches
32
+
33
+ git_checkout_new_branch("/tmp/r", "feature/x")
34
+ git_branch_rename("/tmp/r", old="master", new="main")
35
+ setup_branches("/tmp/r", main="main", develop="develop")
36
+ ```
37
+
38
+ ## Discover parent + remote
39
+
40
+ ```python
41
+ from scitex_git import find_parent_git, get_remote_url, is_cloned_from
42
+
43
+ root = find_parent_git("/tmp/r/sub/dir") # walks up to .git/
44
+ url = get_remote_url("/tmp/r")
45
+ is_cloned_from("/tmp/r", "https://github.com/u/r.git")
46
+ ```
47
+
48
+ ## Retry transient failures
49
+
50
+ ```python
51
+ from scitex_git import git_retry
52
+
53
+ git_retry(["push"], cwd="/tmp/r", attempts=3)
54
+ ```
55
+
56
+ ## Next
57
+
58
+ - [03_python-api.md](03_python-api.md) — full public surface
@@ -0,0 +1,78 @@
1
+ ---
2
+ description: |
3
+ [TOPIC] Python API
4
+ [DETAILS] Public callables — clone/init, commit, branches, parent-git discovery, remote inspection, retry, workflow setup.
5
+ tags: [scitex-git-python-api]
6
+ ---
7
+
8
+ # Python API
9
+
10
+ ## Imports
11
+
12
+ ```python
13
+ from scitex_git import (
14
+ # clone + init
15
+ clone_repo, git_init,
16
+ # commit
17
+ git_add_all, git_commit,
18
+ # branches
19
+ git_branch_rename, git_checkout_new_branch,
20
+ # init / parent discovery
21
+ create_child_git, find_parent_git, init_git_repo, remove_child_git,
22
+ # remote inspection
23
+ get_head_hash, get_remote_url, is_cloned_from, ls_remote,
24
+ # retry
25
+ git_retry,
26
+ # composite workflow
27
+ setup_branches,
28
+ )
29
+ ```
30
+
31
+ ## Clone + init
32
+
33
+ | Callable | Purpose |
34
+ |---------------------------------------|------------------------------------------|
35
+ | `clone_repo(url, dest, ...)` | Clone a remote |
36
+ | `git_init(path)` | `git init` at a path |
37
+ | `init_git_repo(path)` | Init + sensible defaults |
38
+ | `create_child_git(parent, child)` | Add a nested git repo |
39
+ | `remove_child_git(child)` | Remove a nested git repo cleanly |
40
+
41
+ ## Commit
42
+
43
+ | Callable | Purpose |
44
+ |---------------------------------------|------------------------------------------|
45
+ | `git_add_all(path)` | `git add -A` |
46
+ | `git_commit(path, message=...)` | `git commit -m` |
47
+
48
+ ## Branches
49
+
50
+ | Callable | Purpose |
51
+ |---------------------------------------|------------------------------------------|
52
+ | `git_checkout_new_branch(path, name)` | `git checkout -b` |
53
+ | `git_branch_rename(path, old, new)` | Rename a branch |
54
+ | `setup_branches(path, main, develop)` | Create a main/develop topology |
55
+
56
+ ## Discovery + inspection
57
+
58
+ | Callable | Purpose |
59
+ |---------------------------------------|------------------------------------------|
60
+ | `find_parent_git(path)` | Walk up to enclosing `.git/` |
61
+ | `get_remote_url(path, name="origin")` | Fetch the remote URL |
62
+ | `get_head_hash(path)` | HEAD commit SHA |
63
+ | `is_cloned_from(path, url)` | True if origin matches |
64
+ | `ls_remote(url)` | List remote refs without cloning |
65
+
66
+ ## Retry
67
+
68
+ ```python
69
+ git_retry(["push"], cwd=".", attempts=3, backoff=2.0)
70
+ ```
71
+
72
+ Wraps any `git` subcommand in exponential backoff for transient network
73
+ failures.
74
+
75
+ ## Notes
76
+
77
+ All callables return either `None` or stdout-as-str; failures raise
78
+ `subprocess.CalledProcessError` (or a subclass).
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: scitex-git
3
+ description: |
4
+ [WHAT] Programmatic git operations — clone/init/commit/branch/remote/retry helpers (`clone_repo`, `git_init`, `git_commit`, `git_branch_rename`, `find_parent_git`, `get_remote_url`, `is_cloned_from`, `git_retry`, `setup_branches`, ...).
5
+ [WHEN] Automating git workflows from Python without shelling out and parsing stdout — repo init, commits, branch setup, parent-git discovery.
6
+ [HOW] `from scitex_git import clone_repo, git_init, git_commit, git_add_all, git_retry, ...` — wraps subprocess `git`.
7
+ tags: [scitex-git]
8
+ primary_interface: python
9
+ interfaces:
10
+ python: 3
11
+ cli: 0
12
+ mcp: 0
13
+ skills: 2
14
+ http: 0
15
+ ---
16
+
17
+ > **Interfaces:** Python ⭐⭐⭐ · CLI — · MCP — · Skills ⭐⭐ · Hook — · HTTP —
18
+
19
+ # scitex-git
20
+
21
+ Programmatic git operations — `clone_repo`, `git_init`, `git_commit`, `git_add_all`, `git_branch_rename`, `git_checkout_new_branch`, `find_parent_git`, `init_git_repo`, `get_remote_url`, `is_cloned_from`, `git_retry`, `setup_branches`. Drop-in replacement for shelling out to `git` via `subprocess.run` and parsing stdout.
22
+
23
+ ## Sub-skills
24
+
25
+ - [01_installation.md](01_installation.md) — pip install + system `git` requirement
26
+ - [02_quick-start.md](02_quick-start.md) — clone, init, commit, branch, retry
27
+ - [03_python-api.md](03_python-api.md) — full public surface
28
+
29
+ See README.md and the package's public `__init__.py` for the full
30
+ function list.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scitex-git
3
- Version: 0.1.3
4
- Summary: Git operations and utilities (clone, branch, commit, retry, remote helpers) — standalone module from the SciTeX ecosystem
3
+ Version: 0.3.0
4
+ Summary: Git + GitHub Actions utilities (clone, branch, commit, retry, remote helpers, gh secrets/variables with SHA256 sidecar) — standalone module from the SciTeX ecosystem
5
5
  Author-email: Yusuke Watanabe <ywatanabe@scitex.ai>
6
6
  License-Expression: AGPL-3.0-only
7
7
  Project-URL: Homepage, https://github.com/ywatanabe1989/scitex-git
@@ -25,6 +25,7 @@ Provides-Extra: dev
25
25
  Requires-Dist: pytest; extra == "dev"
26
26
  Requires-Dist: pytest-cov; extra == "dev"
27
27
  Requires-Dist: ruff; extra == "dev"
28
+ Requires-Dist: scitex-dev>=0.11.7; extra == "dev"
28
29
  Provides-Extra: docs
29
30
  Requires-Dist: sphinx>=7.0; extra == "docs"
30
31
  Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
@@ -37,16 +38,6 @@ Dynamic: license-file
37
38
 
38
39
  # scitex-git
39
40
 
40
- <!-- scitex-badges:start -->
41
- [![PyPI](https://img.shields.io/pypi/v/scitex-git.svg)](https://pypi.org/project/scitex-git/)
42
- [![Python](https://img.shields.io/pypi/pyversions/scitex-git.svg)](https://pypi.org/project/scitex-git/)
43
- [![Tests](https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml)
44
- [![Install Test](https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml)
45
- [![Coverage](https://codecov.io/gh/ywatanabe1989/scitex-git/graph/badge.svg)](https://codecov.io/gh/ywatanabe1989/scitex-git)
46
- [![Docs](https://readthedocs.org/projects/scitex-git/badge/?version=latest)](https://scitex-git.readthedocs.io/en/latest/)
47
- [![License: AGPL v3](https://img.shields.io/badge/license-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
48
- <!-- scitex-badges:end -->
49
-
50
41
  <p align="center">
51
42
  <a href="https://scitex.ai">
52
43
  <img src="docs/scitex-logo-blue-cropped.png" alt="SciTeX" width="400">
@@ -59,6 +50,18 @@ Dynamic: license-file
59
50
  <a href="https://scitex-git.readthedocs.io/">Full Documentation</a> · <code>pip install scitex-git</code>
60
51
  </p>
61
52
 
53
+ <!-- scitex-badges:start -->
54
+ <p align="center">
55
+ <a href="https://pypi.org/project/scitex-git/"><img src="https://img.shields.io/pypi/v/scitex-git.svg" alt="PyPI"></a>
56
+ <a href="https://pypi.org/project/scitex-git/"><img src="https://img.shields.io/pypi/pyversions/scitex-git.svg" alt="Python"></a>
57
+ <a href="https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml"><img src="https://github.com/ywatanabe1989/scitex-git/actions/workflows/test.yml/badge.svg" alt="Tests"></a>
58
+ <a href="https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml"><img src="https://github.com/ywatanabe1989/scitex-git/actions/workflows/install-test.yml/badge.svg" alt="Install Test"></a>
59
+ <a href="https://codecov.io/gh/ywatanabe1989/scitex-git"><img src="https://codecov.io/gh/ywatanabe1989/scitex-git/graph/badge.svg" alt="Coverage"></a>
60
+ <a href="https://scitex-git.readthedocs.io/en/latest/"><img src="https://readthedocs.org/projects/scitex-git/badge/?version=latest" alt="Docs"></a>
61
+ <a href="https://www.gnu.org/licenses/agpl-3.0"><img src="https://img.shields.io/badge/license-AGPL_v3-blue.svg" alt="License: AGPL v3"></a>
62
+ </p>
63
+ <!-- scitex-badges:end -->
64
+
62
65
  ---
63
66
 
64
67
  ## Installation
@@ -67,19 +70,29 @@ Dynamic: license-file
67
70
  pip install scitex-git
68
71
  ```
69
72
 
70
- ## Quick Start
73
+ ## Architecture
71
74
 
72
- ```python
73
- import scitex_git as sxg
74
-
75
- sxg.clone_repo("https://github.com/foo/bar", "./bar")
76
- sxg.git_add_all("./bar")
77
- sxg.git_commit("./bar", message="initial")
78
75
  ```
76
+ scitex_git/
77
+ ├── _clone.py ← clone_repo, ls_remote, get_remote_url
78
+ ├── _init.py ← git_init, init_git_repo, find_parent_git
79
+ ├── _commit.py ← git_add_all, git_commit
80
+ ├── _branch.py ← checkout_new_branch, branch_rename, setup_branches
81
+ ├── _remote.py ← remote-URL helpers, head-hash queries
82
+ ├── _retry.py ← @git_retry decorator (transient-error backoff)
83
+ ├── _validation.py ← repo-state guards
84
+ ├── _workflow.py ← high-level multi-step flows
85
+ ├── _vendor_sh.py ← ~70-LOC subprocess wrapper (replaces scitex.sh)
86
+ └── _skills/ ← agent-facing skill pages
87
+ ```
88
+
89
+ Pure-stdlib core. `_vendor_sh.py` is intentionally tiny so the package
90
+ has no `scitex.*` runtime dependency. The umbrella `scitex.git` import
91
+ resolves through a `sys.modules` bridge.
79
92
 
80
93
  ## 1 Interfaces
81
94
 
82
- <details>
95
+ <details open>
83
96
  <summary><strong>Python API</strong></summary>
84
97
 
85
98
  <br>
@@ -119,6 +132,34 @@ def maybe_flaky_operation(): ...
119
132
 
120
133
  </details>
121
134
 
135
+ ## Demo
136
+
137
+ ```mermaid
138
+ flowchart LR
139
+ A["scitex_git.clone_repo<br/>(url, dest)"] --> B["@git_retry<br/>(transient errors)"]
140
+ B --> C["repo on disk"]
141
+ C --> D["git_add_all + git_commit"]
142
+ D --> E["checkout_new_branch<br/>+ branch_rename"]
143
+ E --> F["get_remote_url /<br/>get_head_hash"]
144
+ ```
145
+
146
+ ```python
147
+ >>> import scitex_git as sxg
148
+ >>> sxg.clone_repo("https://github.com/foo/bar", "./bar")
149
+ >>> sxg.git_add_all("./bar")
150
+ >>> sxg.git_commit("./bar", message="initial")
151
+ ```
152
+
153
+ ## Quick Start
154
+
155
+ ```python
156
+ import scitex_git as sxg
157
+
158
+ sxg.clone_repo("https://github.com/foo/bar", "./bar")
159
+ sxg.git_add_all("./bar")
160
+ sxg.git_commit("./bar", message="initial")
161
+ ```
162
+
122
163
  ## Status
123
164
 
124
165
  Standalone fork of `scitex.git`. `scitex.logging.getLogger` is replaced by stdlib
@@ -133,7 +174,9 @@ The umbrella package's `scitex.git` import path is preserved via a
133
174
 
134
175
  ## Part of SciTeX
135
176
 
136
- `scitex-git` is part of [**SciTeX**](https://scitex.ai).
177
+ `scitex-git` is part of [**SciTeX**](https://scitex.ai). Install via
178
+ the umbrella with `pip install scitex[git]` to use as
179
+ `scitex.git` (Python) or `scitex git ...` (CLI).
137
180
 
138
181
  >Four Freedoms for Research
139
182
  >
@@ -6,6 +6,7 @@ src/scitex_git/_branch.py
6
6
  src/scitex_git/_clone.py
7
7
  src/scitex_git/_commit.py
8
8
  src/scitex_git/_constants.py
9
+ src/scitex_git/_gh_secrets.py
9
10
  src/scitex_git/_init.py
10
11
  src/scitex_git/_remote.py
11
12
  src/scitex_git/_result.py
@@ -21,4 +22,7 @@ src/scitex_git.egg-info/dependency_links.txt
21
22
  src/scitex_git.egg-info/entry_points.txt
22
23
  src/scitex_git.egg-info/requires.txt
23
24
  src/scitex_git.egg-info/top_level.txt
25
+ src/scitex_git/_skills/scitex-git/01_installation.md
26
+ src/scitex_git/_skills/scitex-git/02_quick-start.md
27
+ src/scitex_git/_skills/scitex-git/03_python-api.md
24
28
  src/scitex_git/_skills/scitex-git/SKILL.md
@@ -7,6 +7,7 @@ scitex-git[dev,docs]
7
7
  pytest
8
8
  pytest-cov
9
9
  ruff
10
+ scitex-dev>=0.11.7
10
11
 
11
12
  [docs]
12
13
  sphinx>=7.0
@@ -1,25 +0,0 @@
1
- ---
2
- name: scitex-git
3
- description: Programmatic git operations — `clone_repo`, `git_init`, `git_commit`, `git_add_all`, `git_branch_rename`, `git_checkout_new_branch`, `find_parent_git`, `init_git_repo`, `get_remote_url`, `is_cloned_from`, `git_retry`, `setup_branches`. Drop-in replacement for shelling out to `git` via `subprocess.run` and parsing stdout.
4
- primary_interface: python
5
- interfaces:
6
- python: 3
7
- cli: 1
8
- mcp: 0
9
- skills: 2
10
- hook: 0
11
- http: 0
12
- canonical-location: scitex-git/src/scitex_git/_skills/scitex-git/SKILL.md
13
- tags: [scitex-git, scitex-package]
14
- ---
15
-
16
- > **Interfaces:** Python ⭐⭐⭐ · CLI ⭐ · MCP — · Skills ⭐⭐ · Hook — · HTTP —
17
-
18
- # scitex-git
19
-
20
- Programmatic git operations — `clone_repo`, `git_init`, `git_commit`, `git_add_all`, `git_branch_rename`, `git_checkout_new_branch`, `find_parent_git`, `init_git_repo`, `get_remote_url`, `is_cloned_from`, `git_retry`, `setup_branches`. Drop-in replacement for shelling out to `git` via `subprocess.run` and parsing stdout.
21
-
22
- See README.md and the package's public `__init__.py` for the full
23
- function list. This skill leaf exists so agents discover the package
24
- exists and roughly what shape it has — refer to the source for
25
- signatures.
File without changes
File without changes