github2gerrit 0.1.0__py3-none-any.whl → 0.1.3__py3-none-any.whl
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.
- github2gerrit/__init__.py +29 -0
- github2gerrit/cli.py +865 -0
- github2gerrit/config.py +311 -0
- github2gerrit/core.py +1750 -0
- github2gerrit/duplicate_detection.py +542 -0
- github2gerrit/github_api.py +331 -0
- github2gerrit/gitutils.py +655 -0
- github2gerrit/models.py +81 -0
- {github2gerrit-0.1.0.dist-info → github2gerrit-0.1.3.dist-info}/METADATA +5 -4
- github2gerrit-0.1.3.dist-info/RECORD +12 -0
- github2gerrit-0.1.0.dist-info/RECORD +0 -4
- {github2gerrit-0.1.0.dist-info → github2gerrit-0.1.3.dist-info}/WHEEL +0 -0
- {github2gerrit-0.1.0.dist-info → github2gerrit-0.1.3.dist-info}/entry_points.txt +0 -0
github2gerrit/models.py
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
# SPDX-FileCopyrightText: 2025 The Linux Foundation
|
3
|
+
"""
|
4
|
+
Shared data models for github2gerrit.
|
5
|
+
|
6
|
+
This module exists to avoid circular imports between the CLI and the
|
7
|
+
core orchestrator by providing the common dataclasses used across both.
|
8
|
+
"""
|
9
|
+
|
10
|
+
from __future__ import annotations
|
11
|
+
|
12
|
+
from dataclasses import dataclass
|
13
|
+
from pathlib import Path
|
14
|
+
|
15
|
+
|
16
|
+
__all__ = ["GitHubContext", "Inputs"]
|
17
|
+
|
18
|
+
|
19
|
+
@dataclass(frozen=True)
|
20
|
+
class Inputs:
|
21
|
+
"""
|
22
|
+
Effective inputs used by the orchestration pipeline.
|
23
|
+
|
24
|
+
These consolidate:
|
25
|
+
- CLI flags
|
26
|
+
- Environment variables
|
27
|
+
- Configuration file values
|
28
|
+
"""
|
29
|
+
|
30
|
+
# Primary behavior flags
|
31
|
+
submit_single_commits: bool
|
32
|
+
use_pr_as_commit: bool
|
33
|
+
fetch_depth: int
|
34
|
+
|
35
|
+
# Required SSH/Git identity inputs
|
36
|
+
gerrit_known_hosts: str
|
37
|
+
gerrit_ssh_privkey_g2g: str
|
38
|
+
gerrit_ssh_user_g2g: str
|
39
|
+
gerrit_ssh_user_g2g_email: str
|
40
|
+
|
41
|
+
# Metadata and reviewers
|
42
|
+
organization: str
|
43
|
+
reviewers_email: str
|
44
|
+
|
45
|
+
# Behavior toggles
|
46
|
+
preserve_github_prs: bool
|
47
|
+
dry_run: bool
|
48
|
+
|
49
|
+
# Optional (reusable workflow compatibility / overrides)
|
50
|
+
gerrit_server: str
|
51
|
+
gerrit_server_port: str
|
52
|
+
gerrit_project: str
|
53
|
+
issue_id: str
|
54
|
+
allow_duplicates: bool
|
55
|
+
|
56
|
+
|
57
|
+
@dataclass(frozen=True)
|
58
|
+
class GitHubContext:
|
59
|
+
"""
|
60
|
+
Minimal GitHub event context used by the orchestrator.
|
61
|
+
|
62
|
+
This captures only the fields the flow depends on, regardless of
|
63
|
+
whether the tool is triggered inside GitHub Actions or invoked
|
64
|
+
directly with a URL (in which case many of these may be empty).
|
65
|
+
"""
|
66
|
+
|
67
|
+
event_name: str
|
68
|
+
event_action: str
|
69
|
+
event_path: Path | None
|
70
|
+
|
71
|
+
repository: str
|
72
|
+
repository_owner: str
|
73
|
+
server_url: str
|
74
|
+
|
75
|
+
run_id: str
|
76
|
+
sha: str
|
77
|
+
|
78
|
+
base_ref: str
|
79
|
+
head_ref: str
|
80
|
+
|
81
|
+
pr_number: int | None
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: github2gerrit
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: Submit a GitHub pull request to a Gerrit repository.
|
5
5
|
Keywords: github,gerrit,ci,actions,typer,cli
|
6
6
|
Author-Email: Matthew Watkins <mwatkins@linuxfoundation.org>
|
@@ -12,13 +12,14 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
15
16
|
Classifier: Programming Language :: Python :: 3.13
|
16
17
|
Classifier: Topic :: Software Development :: Build Tools
|
17
18
|
Classifier: Topic :: Software Development :: Version Control
|
18
19
|
Classifier: Typing :: Typed
|
19
|
-
Project-URL: Homepage, https://github.com/
|
20
|
-
Project-URL: Repository, https://github.com/
|
21
|
-
Project-URL: Issues, https://github.com/
|
20
|
+
Project-URL: Homepage, https://github.com//lfreleng-actions/github2gerrit
|
21
|
+
Project-URL: Repository, https://github.com//lfreleng-actions/github2gerrit
|
22
|
+
Project-URL: Issues, https://github.com//lfreleng-actions/github2gerrit/issues
|
22
23
|
Requires-Python: <3.14,>=3.11
|
23
24
|
Requires-Dist: typer>=0.12.5
|
24
25
|
Requires-Dist: PyGithub>=2.3.0
|
@@ -0,0 +1,12 @@
|
|
1
|
+
github2gerrit-0.1.3.dist-info/METADATA,sha256=W1uO2Iw4S8iK2t-YUUMIKEDCvoSovGZ0YuQDJm265ns,16565
|
2
|
+
github2gerrit-0.1.3.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
3
|
+
github2gerrit-0.1.3.dist-info/entry_points.txt,sha256=k9o_IZVaczDj5WeWlM3q5l86YJyVK5TEhJLV09ZPU_4,72
|
4
|
+
github2gerrit/__init__.py,sha256=N1Vj1HJ28LKCJLAynQdm5jFGQQAz9YSMzZhEfvbBgow,886
|
5
|
+
github2gerrit/cli.py,sha256=IAVoFdR5svmPMKLpdWe0I_EysuddIrmrkN44w0haSpA,29144
|
6
|
+
github2gerrit/config.py,sha256=Kaeg67L4T477PNCP0olCyYNJ95B1XKxAFfEjPT4Mrh8,9755
|
7
|
+
github2gerrit/core.py,sha256=d9b0VnmNKkbOwz2mREdFnSlX_LrNZrUFK2qbjqWHT0Q,65156
|
8
|
+
github2gerrit/duplicate_detection.py,sha256=B6l98fFHC3vIk7-RcGRN5Tse1zvok4D2JwRlXGSvvO4,19470
|
9
|
+
github2gerrit/github_api.py,sha256=pmWeA0_pwvVlWLCBisG2bRpUQEqyDqr0b2EY01mviIY,10372
|
10
|
+
github2gerrit/gitutils.py,sha256=y77L4HPZoz_XfSyoRyCTK8og0BHXUreZb0kwLLrXKyI,18099
|
11
|
+
github2gerrit/models.py,sha256=DAm0pEWvAexOInnxTVrvTnKWhLMd86TfSqT78UohOCo,1791
|
12
|
+
github2gerrit-0.1.3.dist-info/RECORD,,
|
@@ -1,4 +0,0 @@
|
|
1
|
-
github2gerrit-0.1.0.dist-info/METADATA,sha256=crIJcduqPRdW83ZJIEH4f4EcH4x5eY5o-18MZ5v0PDk,16475
|
2
|
-
github2gerrit-0.1.0.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
3
|
-
github2gerrit-0.1.0.dist-info/entry_points.txt,sha256=k9o_IZVaczDj5WeWlM3q5l86YJyVK5TEhJLV09ZPU_4,72
|
4
|
-
github2gerrit-0.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|