github-rest-api 0.53.0__tar.gz → 0.53.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.
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/merge-pr.yaml +9 -7
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/PKG-INFO +1 -1
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/lint_repo.py +12 -1
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/pyproject.toml +1 -1
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_lint_repo.py +10 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/uv.lock +1 -1
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.devcontainer/devcontainer.json +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/check-workflow-template.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/claude.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/create-pr-dev-to-main.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/create-pr-to-dev.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/create-pr-to-main.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/pr-workflow.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/release.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/remove-branch.yaml +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/.gitignore +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/AGENTS.md +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/CLAUDE.md +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/README.md +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/__init__.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/github.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/pr_content.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/__init__.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/cargo/__init__.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/cargo/benchmark.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/cargo/profiling.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/cargo/utils.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/container/__init__.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/container/build_container_images.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/container/config_container.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/container/update_version_containerfile.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/__init__.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/auto_merge_pull_request.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/create_github_repo.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/create_pull_request.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/release_on_github.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/remove_branch.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/upload_image_to_issue.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/utils.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/utils.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/memory/MEMORY.md +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/memory/feedback_test_runner.md +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/__init__.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_auto_merge_pull_request.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_build_container_images.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_create_github_repo.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_create_pull_request.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_github.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_pr_content.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_release_on_github.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_upload_image_to_issue.py +0 -0
- {github_rest_api-0.53.0 → github_rest_api-0.53.1}/tests/test_utils.py +0 -0
|
@@ -42,13 +42,6 @@ on:
|
|
|
42
42
|
permissions:
|
|
43
43
|
contents: write
|
|
44
44
|
pull-requests: write
|
|
45
|
-
concurrency:
|
|
46
|
-
# Every run rescans all open PRs, so overlapping runs are pure duplicate work
|
|
47
|
-
# and the newest run always sees the freshest state. Do not cancel in
|
|
48
|
-
# progress: a run cancelled midway through the merge API call is worse than a
|
|
49
|
-
# redundant one.
|
|
50
|
-
group: merge-pull-request
|
|
51
|
-
cancel-in-progress: false
|
|
52
45
|
jobs:
|
|
53
46
|
merge_pull_request:
|
|
54
47
|
# A triggering workflow that failed, was cancelled or was skipped left the
|
|
@@ -58,6 +51,15 @@ jobs:
|
|
|
58
51
|
if: |
|
|
59
52
|
github.event_name != 'workflow_run'
|
|
60
53
|
|| github.event.workflow_run.conclusion == 'success'
|
|
54
|
+
concurrency:
|
|
55
|
+
# Every run rescans all open PRs, so overlapping runs are pure duplicate
|
|
56
|
+
# work and the newest run always sees the freshest state. Do not cancel
|
|
57
|
+
# in progress: a run cancelled midway through the merge API call is worse
|
|
58
|
+
# than a redundant one. This is set on the job rather than the workflow
|
|
59
|
+
# so that a run whose `if` skips the job never joins the group, where it
|
|
60
|
+
# would replace (cancel) another PR's pending merge run.
|
|
61
|
+
group: merge-pull-request
|
|
62
|
+
cancel-in-progress: false
|
|
61
63
|
uses: legendu-net/.github/.github/workflows/merge-pr.yaml@main
|
|
62
64
|
with:
|
|
63
65
|
dry_run: ${{ inputs.dry_run || false }}
|
|
@@ -22,6 +22,7 @@ import argparse
|
|
|
22
22
|
import os
|
|
23
23
|
import re
|
|
24
24
|
import shutil
|
|
25
|
+
import stat
|
|
25
26
|
import subprocess as sp
|
|
26
27
|
import sys
|
|
27
28
|
from collections.abc import Callable, Sequence
|
|
@@ -29,6 +30,7 @@ from dataclasses import dataclass, field
|
|
|
29
30
|
from pathlib import Path
|
|
30
31
|
from typing import Literal, cast
|
|
31
32
|
|
|
33
|
+
from dulwich.index import IndexEntry
|
|
32
34
|
from dulwich.repo import Repo
|
|
33
35
|
|
|
34
36
|
#: The outcome of running one check.
|
|
@@ -44,6 +46,12 @@ LANGUAGES = ["python", "rust", "golang", "bash", "fish", "lua", "markdown"]
|
|
|
44
46
|
def list_tracked_files(root: Path) -> list[str]:
|
|
45
47
|
"""List all git-tracked files in a repository.
|
|
46
48
|
|
|
49
|
+
Symbolic links are excluded: a link's content is linted through its
|
|
50
|
+
target (when tracked), and linting the link too would run every check
|
|
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).
|
|
54
|
+
|
|
47
55
|
:param root: The root directory of the git repository (not an arbitrary
|
|
48
56
|
subdirectory of one -- the returned paths, and every command a check
|
|
49
57
|
later runs, are relative to this exact directory).
|
|
@@ -54,7 +62,10 @@ def list_tracked_files(root: Path) -> list[str]:
|
|
|
54
62
|
# `surrogateescape` so a non-UTF-8 filename (which git tracks fine)
|
|
55
63
|
# doesn't crash the whole run; it just won't print legibly.
|
|
56
64
|
return sorted(
|
|
57
|
-
name.decode(errors="surrogateescape")
|
|
65
|
+
name.decode(errors="surrogateescape")
|
|
66
|
+
for name, entry in repo.open_index().items()
|
|
67
|
+
# A conflicted entry (mid-merge) has no single mode; keep it.
|
|
68
|
+
if not (isinstance(entry, IndexEntry) and stat.S_ISLNK(entry.mode))
|
|
58
69
|
)
|
|
59
70
|
finally:
|
|
60
71
|
repo.close()
|
|
@@ -58,6 +58,16 @@ def test_list_tracked_files_ignores_untracked_files(tmp_path):
|
|
|
58
58
|
assert list_tracked_files(tmp_path) == ["tracked.py"]
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
def test_list_tracked_files_excludes_symlinks(tmp_path):
|
|
62
|
+
_init_repo(tmp_path, {"AGENTS.md": "# Agents\n"})
|
|
63
|
+
(tmp_path / "CLAUDE.md").symlink_to("AGENTS.md")
|
|
64
|
+
porcelain.add(str(tmp_path), paths=["CLAUDE.md"])
|
|
65
|
+
# The link is tracked by git, but only its target should be linted.
|
|
66
|
+
with Repo(str(tmp_path)) as repo:
|
|
67
|
+
assert b"CLAUDE.md" in repo.open_index()
|
|
68
|
+
assert list_tracked_files(tmp_path) == ["AGENTS.md"]
|
|
69
|
+
|
|
70
|
+
|
|
61
71
|
def test_list_tracked_files_survives_a_non_utf8_filename(tmp_path):
|
|
62
72
|
# Git tracks arbitrary byte sequences as filenames; decoding with
|
|
63
73
|
# `surrogateescape` must not raise on one that isn't valid UTF-8. Written
|
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/check-workflow-template.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/.github/workflows/create-pr-dev-to-main.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/cargo/benchmark.py
RENAMED
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/cargo/profiling.py
RENAMED
|
File without changes
|
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/container/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{github_rest_api-0.53.0 → github_rest_api-0.53.1}/github_rest_api/scripts/github/remove_branch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|