github-agent-cli 1.2.1__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 (115) hide show
  1. github_agent_cli-1.2.1/.dockerignore +36 -0
  2. github_agent_cli-1.2.1/.editorconfig +15 -0
  3. github_agent_cli-1.2.1/.ghagent.json +19 -0
  4. github_agent_cli-1.2.1/.gitattributes +8 -0
  5. github_agent_cli-1.2.1/.github/CODEOWNERS +2 -0
  6. github_agent_cli-1.2.1/.github/ISSUE_TEMPLATE/bug-report.yml +45 -0
  7. github_agent_cli-1.2.1/.github/ISSUE_TEMPLATE/config.yml +8 -0
  8. github_agent_cli-1.2.1/.github/ISSUE_TEMPLATE/feature-request.yml +29 -0
  9. github_agent_cli-1.2.1/.github/ISSUE_TEMPLATE/repository-audit.yml +24 -0
  10. github_agent_cli-1.2.1/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  11. github_agent_cli-1.2.1/.github/dependabot.yml +9 -0
  12. github_agent_cli-1.2.1/.github/release.yml +25 -0
  13. github_agent_cli-1.2.1/.github/workflows/ci.yml +172 -0
  14. github_agent_cli-1.2.1/.github/workflows/publish.yml +73 -0
  15. github_agent_cli-1.2.1/.gitignore +26 -0
  16. github_agent_cli-1.2.1/.pre-commit-hooks.yaml +50 -0
  17. github_agent_cli-1.2.1/AGENTS.md +118 -0
  18. github_agent_cli-1.2.1/AGENTS.ru.md +124 -0
  19. github_agent_cli-1.2.1/CHANGELOG.md +131 -0
  20. github_agent_cli-1.2.1/CHANGELOG.ru.md +131 -0
  21. github_agent_cli-1.2.1/CITATION.cff +18 -0
  22. github_agent_cli-1.2.1/CODE_OF_CONDUCT.md +35 -0
  23. github_agent_cli-1.2.1/CODE_OF_CONDUCT.ru.md +35 -0
  24. github_agent_cli-1.2.1/CONTRIBUTING.md +146 -0
  25. github_agent_cli-1.2.1/CONTRIBUTING.ru.md +147 -0
  26. github_agent_cli-1.2.1/Dockerfile +38 -0
  27. github_agent_cli-1.2.1/GOVERNANCE.md +35 -0
  28. github_agent_cli-1.2.1/GOVERNANCE.ru.md +36 -0
  29. github_agent_cli-1.2.1/LICENSE +21 -0
  30. github_agent_cli-1.2.1/PKG-INFO +431 -0
  31. github_agent_cli-1.2.1/README.de.md +413 -0
  32. github_agent_cli-1.2.1/README.es.md +408 -0
  33. github_agent_cli-1.2.1/README.hi.md +400 -0
  34. github_agent_cli-1.2.1/README.md +402 -0
  35. github_agent_cli-1.2.1/README.ru.md +406 -0
  36. github_agent_cli-1.2.1/README.zh.md +384 -0
  37. github_agent_cli-1.2.1/SECURITY.md +46 -0
  38. github_agent_cli-1.2.1/SECURITY.ru.md +44 -0
  39. github_agent_cli-1.2.1/SUPPORT.md +28 -0
  40. github_agent_cli-1.2.1/SUPPORT.ru.md +23 -0
  41. github_agent_cli-1.2.1/action.yml +74 -0
  42. github_agent_cli-1.2.1/assets/social-preview.png +0 -0
  43. github_agent_cli-1.2.1/assets/social-preview.svg +21 -0
  44. github_agent_cli-1.2.1/docs/ARCHITECTURE.md +103 -0
  45. github_agent_cli-1.2.1/docs/IMPORT.md +89 -0
  46. github_agent_cli-1.2.1/docs/IMPORT.ru.md +97 -0
  47. github_agent_cli-1.2.1/docs/PACKAGING.md +363 -0
  48. github_agent_cli-1.2.1/docs/PROCEDURES.md +125 -0
  49. github_agent_cli-1.2.1/docs/PROCEDURES.ru.md +102 -0
  50. github_agent_cli-1.2.1/docs/RULES.md +329 -0
  51. github_agent_cli-1.2.1/docs/WIKI.md +123 -0
  52. github_agent_cli-1.2.1/examples/ci-usage.md +112 -0
  53. github_agent_cli-1.2.1/examples/docker.md +68 -0
  54. github_agent_cli-1.2.1/examples/pre-commit-config.yaml +30 -0
  55. github_agent_cli-1.2.1/pyproject.toml +126 -0
  56. github_agent_cli-1.2.1/reference/agents-template.md +64 -0
  57. github_agent_cli-1.2.1/reference/agents-template.ru.md +65 -0
  58. github_agent_cli-1.2.1/reference/changelog-template.md +33 -0
  59. github_agent_cli-1.2.1/reference/changelog-template.ru.md +33 -0
  60. github_agent_cli-1.2.1/reference/checklists.md +57 -0
  61. github_agent_cli-1.2.1/reference/checklists.ru.md +56 -0
  62. github_agent_cli-1.2.1/reference/contributing-template.md +36 -0
  63. github_agent_cli-1.2.1/reference/contributing-template.ru.md +30 -0
  64. github_agent_cli-1.2.1/reference/issue-form-template.yml +41 -0
  65. github_agent_cli-1.2.1/reference/readme-template.md +128 -0
  66. github_agent_cli-1.2.1/reference/readme-template.ru.md +122 -0
  67. github_agent_cli-1.2.1/reference/style-guide.md +81 -0
  68. github_agent_cli-1.2.1/reference/style-guide.ru.md +87 -0
  69. github_agent_cli-1.2.1/reference/wiki-home-template.md +30 -0
  70. github_agent_cli-1.2.1/reference/wiki-home-template.ru.md +28 -0
  71. github_agent_cli-1.2.1/reference/wiki-manifest-template.json +12 -0
  72. github_agent_cli-1.2.1/scripts/build_and_check.ps1 +140 -0
  73. github_agent_cli-1.2.1/scripts/build_and_check.sh +107 -0
  74. github_agent_cli-1.2.1/skills/changelog-release/SKILL.md +88 -0
  75. github_agent_cli-1.2.1/skills/changelog-release/SKILL.ru.md +89 -0
  76. github_agent_cli-1.2.1/skills/contributing-and-community/SKILL.md +83 -0
  77. github_agent_cli-1.2.1/skills/contributing-and-community/SKILL.ru.md +86 -0
  78. github_agent_cli-1.2.1/skills/github-repo/SKILL.md +65 -0
  79. github_agent_cli-1.2.1/skills/github-repo/SKILL.ru.md +63 -0
  80. github_agent_cli-1.2.1/skills/github-wiki/SKILL.md +83 -0
  81. github_agent_cli-1.2.1/skills/github-wiki/SKILL.ru.md +89 -0
  82. github_agent_cli-1.2.1/skills/import-to-agents/SKILL.md +82 -0
  83. github_agent_cli-1.2.1/skills/import-to-agents/SKILL.ru.md +82 -0
  84. github_agent_cli-1.2.1/skills/repo-images/SKILL.md +94 -0
  85. github_agent_cli-1.2.1/skills/repo-images/SKILL.ru.md +91 -0
  86. github_agent_cli-1.2.1/tests/run_tests.py +1108 -0
  87. github_agent_cli-1.2.1/tools/ghagent.py +511 -0
  88. github_agent_cli-1.2.1/tools/ghalib/__init__.py +5 -0
  89. github_agent_cli-1.2.1/tools/ghalib/assets.py +475 -0
  90. github_agent_cli-1.2.1/tools/ghalib/audit.py +649 -0
  91. github_agent_cli-1.2.1/tools/ghalib/changelog.py +473 -0
  92. github_agent_cli-1.2.1/tools/ghalib/config.py +52 -0
  93. github_agent_cli-1.2.1/tools/ghalib/install.py +189 -0
  94. github_agent_cli-1.2.1/tools/ghalib/mdcheck.py +424 -0
  95. github_agent_cli-1.2.1/tools/ghalib/meta.py +274 -0
  96. github_agent_cli-1.2.1/tools/ghalib/report.py +90 -0
  97. github_agent_cli-1.2.1/tools/ghalib/util.py +522 -0
  98. github_agent_cli-1.2.1/tools/ghalib/wiki.py +512 -0
  99. github_agent_cli-1.2.1/wiki/01-Why.md +46 -0
  100. github_agent_cli-1.2.1/wiki/01-Why.ru.md +44 -0
  101. github_agent_cli-1.2.1/wiki/02-Install.md +143 -0
  102. github_agent_cli-1.2.1/wiki/02-Install.ru.md +142 -0
  103. github_agent_cli-1.2.1/wiki/03-Repository-Contract.md +115 -0
  104. github_agent_cli-1.2.1/wiki/03-Repository-Contract.ru.md +104 -0
  105. github_agent_cli-1.2.1/wiki/04-Wiki-Workflow.md +86 -0
  106. github_agent_cli-1.2.1/wiki/04-Wiki-Workflow.ru.md +78 -0
  107. github_agent_cli-1.2.1/wiki/05-Release.md +69 -0
  108. github_agent_cli-1.2.1/wiki/05-Release.ru.md +69 -0
  109. github_agent_cli-1.2.1/wiki/06-Traps.md +59 -0
  110. github_agent_cli-1.2.1/wiki/06-Traps.ru.md +58 -0
  111. github_agent_cli-1.2.1/wiki/07-Import.md +73 -0
  112. github_agent_cli-1.2.1/wiki/07-Import.ru.md +76 -0
  113. github_agent_cli-1.2.1/wiki/Home.md +42 -0
  114. github_agent_cli-1.2.1/wiki/Home.ru.md +41 -0
  115. github_agent_cli-1.2.1/wiki/wiki.json +20 -0
@@ -0,0 +1,36 @@
1
+ # Version control and history
2
+ .git
3
+ .gitignore
4
+ .gitattributes
5
+
6
+ # Build outputs
7
+ dist
8
+ build
9
+ *.egg-info
10
+ *.whl
11
+ *.tar.gz
12
+
13
+ # Caches and generated state
14
+ **/__pycache__
15
+ **/*.py[cod]
16
+ .ghagent
17
+ .install.json
18
+ .pytest_cache
19
+ .mypy_cache
20
+ .ruff_cache
21
+
22
+ # Virtual environments
23
+ .venv
24
+ venv
25
+ env
26
+
27
+ # Local reports
28
+ AUDIT.md
29
+ report.md
30
+ audit.json
31
+
32
+ # Editors and OS
33
+ .vscode
34
+ .idea
35
+ Thumbs.db
36
+ desktop.ini
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.{json,yml,yaml}]
12
+ indent_size = 2
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
@@ -0,0 +1,19 @@
1
+ {
2
+ "_comment": "Configuration read by tools/ghagent.py; paths are relative to this file.",
3
+ "owner_repo": "paulmann/github-agent",
4
+ "default_branch": "main",
5
+ "readme": "README.md",
6
+ "agents": "AGENTS.md",
7
+ "changelog": "CHANGELOG.md",
8
+ "docs_dir": "docs",
9
+ "wiki_dir": "wiki",
10
+ "wiki_manifest": "wiki/wiki.json",
11
+ "ci_workflow": ".github/workflows/ci.yml",
12
+ "require_files": ["AGENTS.md", "LICENSE", "pyproject.toml", "tests/run_tests.py", "tools/ghagent.py"],
13
+ "ignore_rules": [],
14
+ "topic_min": 8,
15
+ "topic_max": 20,
16
+ "description_max": 200,
17
+ "changelog_style": "keepachangelog",
18
+ "language": "ru"
19
+ }
@@ -0,0 +1,8 @@
1
+ * text=auto eol=lf
2
+
3
+ *.png binary
4
+ *.jpg binary
5
+ *.gif binary
6
+ *.ico binary
7
+ *.pdf binary
8
+ *.zip binary
@@ -0,0 +1,2 @@
1
+ # Every change needs a review from the maintainer.
2
+ * @paulmann
@@ -0,0 +1,45 @@
1
+ name: Bug report
2
+ description: A command does not do what the documentation says
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Before filing, run the command with --json and paste its output: it names the rule
9
+ and the file without exposing file contents.
10
+ - type: input
11
+ id: version
12
+ attributes:
13
+ label: Pack version
14
+ description: Output of python tools/ghagent.py --version
15
+ placeholder: github-agent 1.0.0
16
+ validations:
17
+ required: true
18
+ - type: input
19
+ id: python
20
+ attributes:
21
+ label: Python version and OS
22
+ placeholder: Python 3.13.15 on Windows 11
23
+ validations:
24
+ required: true
25
+ - type: textarea
26
+ id: command
27
+ attributes:
28
+ label: Command and its output
29
+ description: The exact command, the exit code, and the output (use --json if possible)
30
+ render: shell
31
+ validations:
32
+ required: true
33
+ - type: textarea
34
+ id: expected
35
+ attributes:
36
+ label: What you expected instead
37
+ validations:
38
+ required: true
39
+ - type: checkboxes
40
+ id: hygiene
41
+ attributes:
42
+ label: Hygiene
43
+ options:
44
+ - label: The output contains no tokens, passwords or personal data
45
+ required: true
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security policy
4
+ url: https://github.com/paulmann/github-agent/security/policy
5
+ about: Report a vulnerability privately, not in a public issue.
6
+ - name: Support
7
+ url: https://github.com/paulmann/github-agent/blob/main/SUPPORT.md
8
+ about: What to include in a question so it can be answered once.
@@ -0,0 +1,29 @@
1
+ name: Feature request
2
+ description: A check, a command or a template the pack does not have
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: What problem does it solve
9
+ description: A concrete repository situation, not a general wish
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proof
14
+ attributes:
15
+ label: How it can be proven
16
+ description: Which fixture should fail without the change, and which decoy must stay quiet
17
+ validations:
18
+ required: true
19
+ - type: dropdown
20
+ id: kind
21
+ attributes:
22
+ label: Kind of change
23
+ options:
24
+ - New check
25
+ - New command
26
+ - Template or reference
27
+ - Documentation
28
+ validations:
29
+ required: true
@@ -0,0 +1,24 @@
1
+ name: Repository audit request
2
+ description: Ask for an audit of a public repository against these contracts
3
+ labels: ["audit"]
4
+ body:
5
+ - type: input
6
+ id: repo
7
+ attributes:
8
+ label: Repository
9
+ description: owner/name, public, with a README and CHANGELOG
10
+ placeholder: owner/name
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: focus
15
+ attributes:
16
+ label: What to look at first
17
+ description: For example README structure, wiki navigation, changelog dates
18
+ - type: checkboxes
19
+ id: consent
20
+ attributes:
21
+ label: Consent
22
+ options:
23
+ - label: The repository is public and its audit may be discussed in this issue
24
+ required: true
@@ -0,0 +1,20 @@
1
+ ## What changed
2
+
3
+ <!-- One paragraph: what the pull request does and why. -->
4
+
5
+ ## Why
6
+
7
+ <!-- The problem it solves. Link the issue if there is one. -->
8
+
9
+ ## How it was verified
10
+
11
+ - [ ] `python tests/run_tests.py` — all checks pass
12
+ - [ ] `python tools/ghagent.py doc --root .` — exit code 0
13
+ - [ ] `python tools/ghagent.py audit .` — exit code 0
14
+
15
+ ## Checklist
16
+
17
+ - [ ] One logical change; no unrelated edits
18
+ - [ ] A new rule brought a fixture that fails without the change and a decoy that must stay quiet
19
+ - [ ] Documentation updated (AGENTS.md / README.md) if behaviour changed
20
+ - [ ] `[Unreleased]` in CHANGELOG.md mentions the user-visible change
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ open-pull-requests-limit: 3
8
+ commit-message:
9
+ prefix: chore
@@ -0,0 +1,25 @@
1
+ changelog:
2
+ exclude:
3
+ labels:
4
+ - skip-changelog
5
+ - dependencies
6
+ categories:
7
+ - title: Added
8
+ labels:
9
+ - enhancement
10
+ - feature
11
+ - title: Fixed
12
+ labels:
13
+ - bug
14
+ - fix
15
+ - title: Changed
16
+ labels:
17
+ - documentation
18
+ - refactor
19
+ - performance
20
+ - title: Security
21
+ labels:
22
+ - security
23
+ - title: Other changes
24
+ labels:
25
+ - "*"
@@ -0,0 +1,172 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ selftest:
13
+ name: Self-tests (Python ${{ matrix.python }})
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python: ['3.11', '3.13']
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v7
24
+ with:
25
+ python-version: ${{ matrix.python }}
26
+
27
+ - name: Run the pack self-tests
28
+ run: python tests/run_tests.py
29
+
30
+ - name: The CLI answers
31
+ run: python tools/ghagent.py --version
32
+
33
+ documents:
34
+ name: Documents and repository contracts
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v7
38
+
39
+ - uses: actions/setup-python@v7
40
+ with:
41
+ python-version: '3.13'
42
+
43
+ - name: Markdown, links, anchors, privacy
44
+ run: python tools/ghagent.py doc --root .
45
+
46
+ - name: Repository hygiene and file contracts
47
+ run: python tools/ghagent.py audit . --min-score 80
48
+
49
+ - name: Changelog conformance
50
+ run: python tools/ghagent.py changelog check --repo paulmann/github-agent
51
+
52
+ - name: Banner and social preview
53
+ run: python tools/ghagent.py assets check
54
+
55
+ - name: Wiki builds and verifies
56
+ run: |
57
+ python tools/ghagent.py wiki build
58
+ python tools/ghagent.py wiki verify
59
+
60
+ - name: No BOM, no CRLF, no machine paths
61
+ run: python tools/ghagent.py privacy --root .
62
+
63
+ package:
64
+ name: Package (sdist, wheel, clean install)
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - uses: actions/checkout@v7
68
+
69
+ - uses: actions/setup-python@v7
70
+ with:
71
+ python-version: '3.13'
72
+
73
+ - name: Build sdist and wheel
74
+ run: |
75
+ set -euo pipefail
76
+ python -m pip install --disable-pip-version-check build twine
77
+ python -m build
78
+
79
+ - name: Check distribution metadata
80
+ run: python -m twine check dist/*
81
+
82
+ - name: Version, wheel layout and sdist completeness
83
+ run: |
84
+ set -euo pipefail
85
+ EXPECTED_VERSION=$(python - <<'PY'
86
+ import pathlib
87
+ import re
88
+
89
+ text = pathlib.Path("tools/ghalib/util.py").read_text(encoding="utf-8")
90
+ print(re.search(r'^PACK_VERSION = "([^"]+)"', text, re.M).group(1))
91
+ PY
92
+ )
93
+ echo "expected version: $EXPECTED_VERSION"
94
+ test -f "dist/github_agent_cli-${EXPECTED_VERSION}-py3-none-any.whl"
95
+ test -f "dist/github_agent_cli-${EXPECTED_VERSION}.tar.gz"
96
+
97
+ python -m zipfile -l dist/*.whl | tee wheel-contents.txt
98
+ grep -q '^ghagent.py' wheel-contents.txt
99
+ grep -q '^ghalib/' wheel-contents.txt
100
+ if grep -q '^tools/' wheel-contents.txt; then
101
+ echo "::error::the wheel installs a top-level tools package"
102
+ exit 1
103
+ fi
104
+
105
+ python -m tarfile -l dist/*.tar.gz | tee sdist-contents.txt
106
+ for path in action.yml Dockerfile pyproject.toml tools/ghagent.py tests/run_tests.py \
107
+ skills reference docs wiki assets; do
108
+ grep -q "/$path" sdist-contents.txt || {
109
+ echo "::error::the sdist is missing $path"
110
+ exit 1
111
+ }
112
+ done
113
+
114
+ - name: No third-party runtime dependency
115
+ run: |
116
+ set -euo pipefail
117
+ python - <<'PY'
118
+ import email
119
+ import glob
120
+ import zipfile
121
+
122
+ wheel = glob.glob("dist/*.whl")[0]
123
+ with zipfile.ZipFile(wheel) as archive:
124
+ name = next(n for n in archive.namelist() if n.endswith(".dist-info/METADATA"))
125
+ metadata = email.message_from_bytes(archive.read(name))
126
+ requires = metadata.get_all("Requires-Dist") or []
127
+ print("Requires-Dist:", requires or "none")
128
+ unexpected = [item for item in requires if "extra ==" not in item]
129
+ if unexpected:
130
+ raise SystemExit(f"runtime dependencies found: {unexpected}")
131
+ PY
132
+
133
+ - name: Install the wheel in a clean virtual environment
134
+ run: |
135
+ set -euo pipefail
136
+ python -m venv "$RUNNER_TEMP/pkg-venv"
137
+ "$RUNNER_TEMP/pkg-venv/bin/python" -m pip install --disable-pip-version-check dist/*.whl
138
+ "$RUNNER_TEMP/pkg-venv/bin/python" -m pip list
139
+ EXPECTED_VERSION=$(python - <<'PY'
140
+ import pathlib
141
+ import re
142
+
143
+ text = pathlib.Path("tools/ghalib/util.py").read_text(encoding="utf-8")
144
+ print(re.search(r'^PACK_VERSION = "([^"]+)"', text, re.M).group(1))
145
+ PY
146
+ )
147
+ test "$("$RUNNER_TEMP/pkg-venv/bin/ghagent" --version)" = "github-agent $EXPECTED_VERSION"
148
+
149
+ - name: Smoke-test the installed CLI on this checkout
150
+ run: |
151
+ set -euo pipefail
152
+ VENV="$RUNNER_TEMP/pkg-venv"
153
+ "$VENV/bin/ghagent" doc --root .
154
+ "$VENV/bin/ghagent" audit . --min-score 80
155
+
156
+ container:
157
+ name: Container image (build and run)
158
+ runs-on: ubuntu-latest
159
+ steps:
160
+ - uses: actions/checkout@v7
161
+
162
+ - name: Build the image from the Dockerfile
163
+ run: docker build --tag ghagent:ci .
164
+
165
+ - name: The entry point answers
166
+ run: docker run --rm ghagent:ci --version
167
+
168
+ - name: The image audits this checkout
169
+ run: docker run --rm --volume "$PWD:/repo" ghagent:ci audit . --min-score 80
170
+
171
+ - name: The image lints the documents
172
+ run: docker run --rm --volume "$PWD:/repo" ghagent:ci doc --root .
@@ -0,0 +1,73 @@
1
+ name: Publish
2
+
3
+ # Manual only, on purpose: a publication is a human decision, and the trigger is flipped to
4
+ # `release: published` only after the first successful upload.
5
+ #
6
+ # Authentication, in order of preference:
7
+ # 1. Trusted Publishing (OIDC): add a trusted publisher for this project on PyPI, then delete
8
+ # the `password:` line below and the PYPI_API_TOKEN secret. Nothing long-lived is stored.
9
+ # 2. API token: the PYPI_API_TOKEN repository secret (used here until the trusted publisher is
10
+ # configured). Rotate or revoke it after switching to OIDC.
11
+ on:
12
+ workflow_dispatch:
13
+ inputs:
14
+ confirm:
15
+ description: Type "publish" to upload the built distributions to PyPI.
16
+ required: true
17
+ default: ""
18
+ type: string
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ jobs:
24
+ build:
25
+ name: Build and check distributions
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v7
29
+
30
+ - uses: actions/setup-python@v7
31
+ with:
32
+ python-version: '3.13'
33
+
34
+ - name: Build sdist and wheel
35
+ run: |
36
+ set -euo pipefail
37
+ python -m pip install --disable-pip-version-check build twine
38
+ python -m build
39
+
40
+ - name: Check distribution metadata
41
+ run: python -m twine check dist/*
42
+
43
+ - uses: actions/upload-artifact@v4
44
+ with:
45
+ name: dist
46
+ path: dist/
47
+ if-no-files-found: error
48
+
49
+ publish:
50
+ name: Publish to PyPI
51
+ needs: build
52
+ if: github.event_name == 'workflow_dispatch' && inputs.confirm == 'publish'
53
+ runs-on: ubuntu-latest
54
+ environment:
55
+ name: pypi
56
+ url: https://pypi.org/p/github-agent-cli
57
+ permissions:
58
+ id-token: write
59
+ contents: read
60
+ steps:
61
+ - uses: actions/download-artifact@v4
62
+ with:
63
+ name: dist
64
+ path: dist/
65
+
66
+ - name: Publish
67
+ # Pinned release, not a moving tag: the uploader holds the credential.
68
+ # `skip-existing` makes a retry after a partial network failure idempotent.
69
+ uses: pypa/gh-action-pypi-publish@v1.14.3
70
+ with:
71
+ password: ${{ secrets.PYPI_API_TOKEN }}
72
+ skip-existing: true
73
+ print-hash: true
@@ -0,0 +1,26 @@
1
+ # agent work directories
2
+ .ghagent/
3
+ .install.json
4
+
5
+ # python
6
+ __pycache__/
7
+ *.pyc
8
+ .pytest_cache/
9
+
10
+ # packaging
11
+ dist/
12
+ build/
13
+ *.egg-info/
14
+ .venv/
15
+ .venv-*/
16
+
17
+ # editors and OS
18
+ .vscode/
19
+ .idea/
20
+ Thumbs.db
21
+ desktop.ini
22
+
23
+ # local reports
24
+ AUDIT.md
25
+ report.md
26
+ audit.json
@@ -0,0 +1,50 @@
1
+ # pre-commit hooks for github-agent.
2
+ #
3
+ # Install once:
4
+ #
5
+ # pip install pre-commit
6
+ # # .pre-commit-config.yaml in the consuming repository:
7
+ # repos:
8
+ # - repo: https://github.com/paulmann/github-agent
9
+ # rev: v1.2.1
10
+ # hooks:
11
+ # - id: ghagent-doc
12
+ # - id: ghagent-audit
13
+ # - id: ghagent-privacy
14
+ # - id: ghagent-changelog
15
+ #
16
+ # `language: python` makes pre-commit build the wheel from the tagged revision and expose
17
+ # the `ghagent` console script; no separate installation step is needed.
18
+
19
+ - id: ghagent-doc
20
+ name: ghagent doc
21
+ description: Markdown structure, links, anchors, tables and table-of-contents checks.
22
+ entry: ghagent doc --root .
23
+ language: python
24
+ types_or: [markdown]
25
+ pass_filenames: false
26
+ require_serial: true
27
+
28
+ - id: ghagent-audit
29
+ name: ghagent audit
30
+ description: Repository hygiene and file contracts; fails below the score threshold.
31
+ entry: ghagent audit . --min-score 80
32
+ language: python
33
+ pass_filenames: false
34
+ always_run: true
35
+
36
+ - id: ghagent-privacy
37
+ name: ghagent privacy
38
+ description: Secrets, absolute machine paths and personal e-mail addresses in the tree.
39
+ entry: ghagent privacy --root .
40
+ language: python
41
+ pass_filenames: false
42
+ always_run: true
43
+
44
+ - id: ghagent-changelog
45
+ name: ghagent changelog
46
+ description: Keep a Changelog 2.0.0 conformance of CHANGELOG.md.
47
+ entry: ghagent changelog check
48
+ language: python
49
+ files: ^CHANGELOG\.md$
50
+ pass_filenames: false