github-rest-api 0.54.0__tar.gz → 0.55.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 (52) hide show
  1. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/PKG-INFO +1 -1
  2. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/lint_repo.py +12 -26
  3. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/pyproject.toml +1 -1
  4. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_lint_repo.py +10 -7
  5. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/uv.lock +1 -1
  6. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.devcontainer/devcontainer.json +0 -0
  7. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/check-workflow-template.yaml +0 -0
  8. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/claude.yaml +0 -0
  9. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/create-pr-dev-to-main.yaml +0 -0
  10. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/create-pr-to-dev.yaml +0 -0
  11. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/create-pr-to-main.yaml +0 -0
  12. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/merge-pr.yaml +0 -0
  13. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/pr-workflow.yaml +0 -0
  14. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/release.yaml +0 -0
  15. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.github/workflows/remove-branch.yaml +0 -0
  16. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/.gitignore +0 -0
  17. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/AGENTS.md +0 -0
  18. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/CLAUDE.md +0 -0
  19. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/README.md +0 -0
  20. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/__init__.py +0 -0
  21. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/github.py +0 -0
  22. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/pr_content.py +0 -0
  23. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/__init__.py +0 -0
  24. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/cargo/__init__.py +0 -0
  25. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/cargo/benchmark.py +0 -0
  26. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/cargo/profiling.py +0 -0
  27. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/cargo/utils.py +0 -0
  28. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/container/__init__.py +0 -0
  29. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/container/build_container_images.py +0 -0
  30. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/container/config_container.py +0 -0
  31. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/container/update_version_containerfile.py +0 -0
  32. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/__init__.py +0 -0
  33. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/auto_merge_pull_request.py +0 -0
  34. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/create_github_repo.py +0 -0
  35. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/create_pull_request.py +0 -0
  36. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/release_on_github.py +0 -0
  37. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/remove_branch.py +0 -0
  38. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/github/upload_image_to_issue.py +0 -0
  39. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/scripts/utils.py +0 -0
  40. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/github_rest_api/utils.py +0 -0
  41. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/memory/MEMORY.md +0 -0
  42. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/memory/feedback_test_runner.md +0 -0
  43. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/__init__.py +0 -0
  44. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_auto_merge_pull_request.py +0 -0
  45. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_build_container_images.py +0 -0
  46. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_create_github_repo.py +0 -0
  47. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_create_pull_request.py +0 -0
  48. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_github.py +0 -0
  49. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_pr_content.py +0 -0
  50. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_release_on_github.py +0 -0
  51. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_upload_image_to_issue.py +0 -0
  52. {github_rest_api-0.54.0 → github_rest_api-0.55.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: github-rest-api
3
- Version: 0.54.0
3
+ Version: 0.55.0
4
4
  Summary: Simple wrapper of GitHub REST APIs.
5
5
  Author-email: Ben Du <longendu@yahoo.com>
6
6
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -49,8 +49,8 @@ def list_tracked_files(root: Path) -> list[str]:
49
49
  Symbolic links are excluded: a link's content is linted through its
50
50
  target (when tracked), and linting the link too would run every check
51
51
  twice on the same content -- or, worse, with conflicting options (e.g. a
52
- `CLAUDE.md` -> `AGENTS.md` link would get a different mdformat flavor than
53
- its target).
52
+ link in another directory could pick up a different `.mdformat.toml`
53
+ than its target).
54
54
 
55
55
  :param root: The root directory of the git repository (not an arbitrary
56
56
  subdirectory of one -- the returned paths, and every command a check
@@ -374,31 +374,17 @@ def build_markdown_checks(files: Sequence[str], fix: bool = False) -> list[Check
374
374
  md_files = _files_matching(files, "*.md")
375
375
  if not md_files:
376
376
  return []
377
- skill_files = [f for f in md_files if Path(f).name in ("SKILL.md", "AGENTS.md")]
378
- other_files = [f for f in md_files if f not in skill_files]
379
- checks = []
380
- if other_files:
381
- checks.append(
382
- Check(
383
- "markdown: mdformat",
384
- command=_cmd(
385
- fix,
386
- ["mdformat", *other_files],
387
- ["mdformat", "--check", *other_files],
388
- ),
389
- )
390
- )
391
- if skill_files:
392
- checks.append(
393
- Check(
394
- "markdown: mdformat (SKILL.md/AGENTS.md)",
395
- command=_cmd(
396
- fix,
397
- ["mdformat", "--number", *skill_files],
398
- ["mdformat", "--check", "--number", *skill_files],
399
- ),
400
- )
377
+ # Options such as `--number` are left to the repository's own
378
+ # `.mdformat.toml` (which mdformat looks up per file), rather than being
379
+ # hard-coded here.
380
+ checks = [
381
+ Check(
382
+ "markdown: mdformat",
383
+ command=_cmd(
384
+ fix, ["mdformat", *md_files], ["mdformat", "--check", *md_files]
385
+ ),
401
386
  )
387
+ ]
402
388
  checks.append(
403
389
  Check(
404
390
  "markdown: codespell",
@@ -4,7 +4,7 @@ requires = [ "hatchling" ]
4
4
 
5
5
  [project]
6
6
  name = "github-rest-api"
7
- version = "0.54.0"
7
+ version = "0.55.0"
8
8
  description = "Simple wrapper of GitHub REST APIs."
9
9
  readme = "README.md"
10
10
  authors = [ { name = "Ben Du", email = "longendu@yahoo.com" } ]
@@ -181,19 +181,23 @@ def test_build_rust_scripts_checks_includes_all_files():
181
181
  ]
182
182
 
183
183
 
184
- def test_build_markdown_checks_splits_skill_md(tmp_path):
184
+ def test_build_markdown_checks_leaves_numbering_to_mdformat_toml(tmp_path):
185
185
  (tmp_path / "docs").mkdir()
186
186
  (tmp_path / "docs" / "SKILL.md").write_text("")
187
187
  (tmp_path / "AGENTS.md").write_text("")
188
188
  (tmp_path / "README.md").write_text("")
189
189
  checks = build_markdown_checks(["README.md", "AGENTS.md", "docs/SKILL.md"])
190
190
  by_name = {c.name: c for c in checks}
191
- assert by_name["markdown: mdformat"].command == ["mdformat", "--check", "README.md"]
192
- assert by_name["markdown: mdformat (SKILL.md/AGENTS.md)"].command == [
191
+ # SKILL.md/AGENTS.md get no hard-coded `--number`: one mdformat check
192
+ # covers every file, and `.mdformat.toml` controls numbering.
193
+ assert [n for n in by_name if n.startswith("markdown: mdformat")] == [
194
+ "markdown: mdformat"
195
+ ]
196
+ assert by_name["markdown: mdformat"].command == [
193
197
  "mdformat",
194
198
  "--check",
195
- "--number",
196
199
  "AGENTS.md",
200
+ "README.md",
197
201
  "docs/SKILL.md",
198
202
  ]
199
203
  assert by_name["markdown: codespell"].command == [
@@ -550,11 +554,10 @@ def test_build_markdown_checks_fix_mode(tmp_path):
550
554
  ["README.md", "AGENTS.md", "docs/SKILL.md"], fix=True
551
555
  )
552
556
  by_name = {c.name: c.command for c in checks}
553
- assert by_name["markdown: mdformat"] == ["mdformat", "README.md"]
554
- assert by_name["markdown: mdformat (SKILL.md/AGENTS.md)"] == [
557
+ assert by_name["markdown: mdformat"] == [
555
558
  "mdformat",
556
- "--number",
557
559
  "AGENTS.md",
560
+ "README.md",
558
561
  "docs/SKILL.md",
559
562
  ]
560
563
  assert by_name["markdown: codespell"] == [
@@ -542,7 +542,7 @@ wheels = [
542
542
 
543
543
  [[package]]
544
544
  name = "github-rest-api"
545
- version = "0.54.0"
545
+ version = "0.55.0"
546
546
  source = { editable = "." }
547
547
  dependencies = [
548
548
  { name = "dulwich" },