bb2gh 0.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.
- bb2gh-0.2.1/.gitignore +191 -0
- bb2gh-0.2.1/LICENSE +70 -0
- bb2gh-0.2.1/PKG-INFO +262 -0
- bb2gh-0.2.1/README.md +151 -0
- bb2gh-0.2.1/pyproject.toml +223 -0
- bb2gh-0.2.1/src/bb2gh/__about__.py +3 -0
- bb2gh-0.2.1/src/bb2gh/__init__.py +5 -0
- bb2gh-0.2.1/src/bb2gh/adapters/__init__.py +21 -0
- bb2gh-0.2.1/src/bb2gh/adapters/base.py +557 -0
- bb2gh-0.2.1/src/bb2gh/adapters/bitbucket_cloud.py +1269 -0
- bb2gh-0.2.1/src/bb2gh/adapters/github_base.py +1651 -0
- bb2gh-0.2.1/src/bb2gh/adapters/github_cloud.py +40 -0
- bb2gh-0.2.1/src/bb2gh/adapters/github_cloud_dr.py +127 -0
- bb2gh-0.2.1/src/bb2gh/adapters/github_multi_app.py +483 -0
- bb2gh-0.2.1/src/bb2gh/adapters/github_server.py +235 -0
- bb2gh-0.2.1/src/bb2gh/cli/__init__.py +8 -0
- bb2gh-0.2.1/src/bb2gh/cli/__main__.py +6 -0
- bb2gh-0.2.1/src/bb2gh/cli/app.py +1264 -0
- bb2gh-0.2.1/src/bb2gh/cli/auth_cmd.py +400 -0
- bb2gh-0.2.1/src/bb2gh/cli/config_cmd.py +95 -0
- bb2gh-0.2.1/src/bb2gh/cli/console.py +89 -0
- bb2gh-0.2.1/src/bb2gh/cli/credential_resolver.py +179 -0
- bb2gh-0.2.1/src/bb2gh/cli/discover.py +423 -0
- bb2gh-0.2.1/src/bb2gh/cli/error_handler.py +82 -0
- bb2gh-0.2.1/src/bb2gh/cli/migrate.py +574 -0
- bb2gh-0.2.1/src/bb2gh/cli/output.py +450 -0
- bb2gh-0.2.1/src/bb2gh/cli/plan.py +486 -0
- bb2gh-0.2.1/src/bb2gh/cli/protect.py +496 -0
- bb2gh-0.2.1/src/bb2gh/cli/prs.py +705 -0
- bb2gh-0.2.1/src/bb2gh/cli/secrets.py +476 -0
- bb2gh-0.2.1/src/bb2gh/cli/status.py +264 -0
- bb2gh-0.2.1/src/bb2gh/cli/users.py +433 -0
- bb2gh-0.2.1/src/bb2gh/cli/validate.py +621 -0
- bb2gh-0.2.1/src/bb2gh/cli/waves.py +226 -0
- bb2gh-0.2.1/src/bb2gh/cli.py +9 -0
- bb2gh-0.2.1/src/bb2gh/commands/__init__.py +1 -0
- bb2gh-0.2.1/src/bb2gh/exceptions.py +227 -0
- bb2gh-0.2.1/src/bb2gh/identity/__init__.py +42 -0
- bb2gh-0.2.1/src/bb2gh/identity/atlassian_org.py +147 -0
- bb2gh-0.2.1/src/bb2gh/identity/atlassian_scim.py +140 -0
- bb2gh-0.2.1/src/bb2gh/identity/base.py +39 -0
- bb2gh-0.2.1/src/bb2gh/identity/config.py +94 -0
- bb2gh-0.2.1/src/bb2gh/identity/detector.py +167 -0
- bb2gh-0.2.1/src/bb2gh/identity/git_email.py +129 -0
- bb2gh-0.2.1/src/bb2gh/identity/github_saml.py +171 -0
- bb2gh-0.2.1/src/bb2gh/identity/github_scim.py +155 -0
- bb2gh-0.2.1/src/bb2gh/identity/resolver.py +424 -0
- bb2gh-0.2.1/src/bb2gh/identity/wizard.py +238 -0
- bb2gh-0.2.1/src/bb2gh/licensing/__init__.py +17 -0
- bb2gh-0.2.1/src/bb2gh/licensing/decorators.py +152 -0
- bb2gh-0.2.1/src/bb2gh/licensing/features.py +158 -0
- bb2gh-0.2.1/src/bb2gh/licensing/keys.py +235 -0
- bb2gh-0.2.1/src/bb2gh/models/__init__.py +1 -0
- bb2gh-0.2.1/src/bb2gh/models/analysis.py +48 -0
- bb2gh-0.2.1/src/bb2gh/models/branch_protection.py +289 -0
- bb2gh-0.2.1/src/bb2gh/models/config.py +249 -0
- bb2gh-0.2.1/src/bb2gh/models/inventory.py +299 -0
- bb2gh-0.2.1/src/bb2gh/models/license.py +136 -0
- bb2gh-0.2.1/src/bb2gh/models/plan.py +394 -0
- bb2gh-0.2.1/src/bb2gh/models/pull_request.py +286 -0
- bb2gh-0.2.1/src/bb2gh/models/repository.py +51 -0
- bb2gh-0.2.1/src/bb2gh/models/rollback.py +56 -0
- bb2gh-0.2.1/src/bb2gh/models/secret.py +196 -0
- bb2gh-0.2.1/src/bb2gh/models/state.py +159 -0
- bb2gh-0.2.1/src/bb2gh/models/telemetry.py +381 -0
- bb2gh-0.2.1/src/bb2gh/models/user.py +34 -0
- bb2gh-0.2.1/src/bb2gh/models/user_mapping.py +253 -0
- bb2gh-0.2.1/src/bb2gh/models/wave.py +269 -0
- bb2gh-0.2.1/src/bb2gh/models/worker.py +181 -0
- bb2gh-0.2.1/src/bb2gh/secrets/__init__.py +16 -0
- bb2gh-0.2.1/src/bb2gh/secrets/checklist.py +183 -0
- bb2gh-0.2.1/src/bb2gh/secrets/inventory.py +225 -0
- bb2gh-0.2.1/src/bb2gh/secrets/scaffold.py +221 -0
- bb2gh-0.2.1/src/bb2gh/secrets/validation.py +192 -0
- bb2gh-0.2.1/src/bb2gh/services/__init__.py +0 -0
- bb2gh-0.2.1/src/bb2gh/services/branch_protection.py +811 -0
- bb2gh-0.2.1/src/bb2gh/services/credential_store.py +121 -0
- bb2gh-0.2.1/src/bb2gh/services/discovery.py +388 -0
- bb2gh-0.2.1/src/bb2gh/services/gei_archive.py +294 -0
- bb2gh-0.2.1/src/bb2gh/services/git.py +1557 -0
- bb2gh-0.2.1/src/bb2gh/services/mannequin.py +87 -0
- bb2gh-0.2.1/src/bb2gh/services/migration.py +648 -0
- bb2gh-0.2.1/src/bb2gh/services/notifications.py +129 -0
- bb2gh-0.2.1/src/bb2gh/services/planning.py +673 -0
- bb2gh-0.2.1/src/bb2gh/services/pr_activity.py +343 -0
- bb2gh-0.2.1/src/bb2gh/services/pr_comments.py +379 -0
- bb2gh-0.2.1/src/bb2gh/services/pr_migration.py +990 -0
- bb2gh-0.2.1/src/bb2gh/services/rollback.py +629 -0
- bb2gh-0.2.1/src/bb2gh/services/ssl.py +40 -0
- bb2gh-0.2.1/src/bb2gh/services/user_mapping.py +486 -0
- bb2gh-0.2.1/src/bb2gh/services/validation.py +1116 -0
- bb2gh-0.2.1/src/bb2gh/state/__init__.py +9 -0
- bb2gh-0.2.1/src/bb2gh/state/store.py +1214 -0
- bb2gh-0.2.1/src/bb2gh/telemetry/__init__.py +17 -0
- bb2gh-0.2.1/src/bb2gh/telemetry/collector.py +379 -0
- bb2gh-0.2.1/src/bb2gh/telemetry/events.py +235 -0
- bb2gh-0.2.1/src/bb2gh/telemetry/privacy.py +178 -0
- bb2gh-0.2.1/src/bb2gh/telemetry/sender.py +189 -0
- bb2gh-0.2.1/src/bb2gh/utils/__init__.py +1 -0
- bb2gh-0.2.1/src/bb2gh/utils/config.py +188 -0
- bb2gh-0.2.1/src/bb2gh/utils/logging.py +131 -0
- bb2gh-0.2.1/src/bb2gh/waves/__init__.py +17 -0
- bb2gh-0.2.1/src/bb2gh/waves/config.py +341 -0
- bb2gh-0.2.1/src/bb2gh/waves/executor.py +311 -0
- bb2gh-0.2.1/src/bb2gh/waves/status.py +176 -0
- bb2gh-0.2.1/src/bb2gh/workers/__init__.py +18 -0
- bb2gh-0.2.1/src/bb2gh/workers/distributor.py +268 -0
- bb2gh-0.2.1/src/bb2gh/workers/local.py +372 -0
- bb2gh-0.2.1/src/bb2gh/workers/pool.py +84 -0
- bb2gh-0.2.1/src/bb2gh/workers/progress.py +261 -0
- bb2gh-0.2.1/src/bb2gh/workers/rate_limiter.py +272 -0
bb2gh-0.2.1/.gitignore
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Environments
|
|
57
|
+
.env
|
|
58
|
+
.venv
|
|
59
|
+
env/
|
|
60
|
+
venv/
|
|
61
|
+
ENV/
|
|
62
|
+
env.bak/
|
|
63
|
+
venv.bak/
|
|
64
|
+
|
|
65
|
+
# Hatch
|
|
66
|
+
.hatch/
|
|
67
|
+
|
|
68
|
+
# mypy
|
|
69
|
+
.mypy_cache/
|
|
70
|
+
.dmypy.json
|
|
71
|
+
dmypy.json
|
|
72
|
+
|
|
73
|
+
# Ruff
|
|
74
|
+
.ruff_cache/
|
|
75
|
+
|
|
76
|
+
# IDE
|
|
77
|
+
.idea/
|
|
78
|
+
.vscode/
|
|
79
|
+
*.swp
|
|
80
|
+
*.swo
|
|
81
|
+
*~
|
|
82
|
+
.project
|
|
83
|
+
.pydevproject
|
|
84
|
+
.settings/
|
|
85
|
+
*.sublime-project
|
|
86
|
+
*.sublime-workspace
|
|
87
|
+
|
|
88
|
+
# OS
|
|
89
|
+
.DS_Store
|
|
90
|
+
.DS_Store?
|
|
91
|
+
._*
|
|
92
|
+
.Spotlight-V100
|
|
93
|
+
.Trashes
|
|
94
|
+
ehthumbs.db
|
|
95
|
+
Thumbs.db
|
|
96
|
+
|
|
97
|
+
# Project specific
|
|
98
|
+
*.log
|
|
99
|
+
*.sqlite
|
|
100
|
+
*.db
|
|
101
|
+
|
|
102
|
+
# Migration output files (generated during bb2gh operations)
|
|
103
|
+
inventory.json
|
|
104
|
+
plan.json
|
|
105
|
+
plan-*.json
|
|
106
|
+
secrets-inventory.json
|
|
107
|
+
validation-*.json
|
|
108
|
+
user-mapping.csv
|
|
109
|
+
users-*.csv
|
|
110
|
+
|
|
111
|
+
# Git worktrees
|
|
112
|
+
.worktrees/
|
|
113
|
+
|
|
114
|
+
# Migration state files (local user data)
|
|
115
|
+
.bb2gh/
|
|
116
|
+
|
|
117
|
+
# Temporary files
|
|
118
|
+
*.tmp
|
|
119
|
+
*.temp
|
|
120
|
+
.tmp/
|
|
121
|
+
tmp/
|
|
122
|
+
|
|
123
|
+
# Secrets and credentials - never commit
|
|
124
|
+
.env.local
|
|
125
|
+
.env.*.local
|
|
126
|
+
.env.production
|
|
127
|
+
.env.staging
|
|
128
|
+
secrets.yaml
|
|
129
|
+
secrets.yml
|
|
130
|
+
secrets.json
|
|
131
|
+
*.pem
|
|
132
|
+
*.key
|
|
133
|
+
*.p12
|
|
134
|
+
*.pfx
|
|
135
|
+
*.crt
|
|
136
|
+
*.cer
|
|
137
|
+
credentials.json
|
|
138
|
+
credentials.yaml
|
|
139
|
+
credentials.yml
|
|
140
|
+
service-account.json
|
|
141
|
+
serviceaccount.json
|
|
142
|
+
*-service-account.json
|
|
143
|
+
*.keystore
|
|
144
|
+
*.jks
|
|
145
|
+
|
|
146
|
+
# API tokens and keys
|
|
147
|
+
.netrc
|
|
148
|
+
.npmrc
|
|
149
|
+
.pypirc
|
|
150
|
+
token.txt
|
|
151
|
+
tokens.json
|
|
152
|
+
api_key.txt
|
|
153
|
+
api_keys.json
|
|
154
|
+
auth.json
|
|
155
|
+
oauth.json
|
|
156
|
+
|
|
157
|
+
# Cloud provider configs
|
|
158
|
+
.aws/
|
|
159
|
+
.azure/
|
|
160
|
+
.gcloud/
|
|
161
|
+
.config/gcloud/
|
|
162
|
+
kubeconfig
|
|
163
|
+
.kube/config
|
|
164
|
+
|
|
165
|
+
# MCP configuration (may contain tokens)
|
|
166
|
+
.mcp.json
|
|
167
|
+
mcp.json
|
|
168
|
+
|
|
169
|
+
# Claude/AI assistant configs (may contain API keys)
|
|
170
|
+
.claude.json
|
|
171
|
+
.anthropic.json
|
|
172
|
+
.openai.json
|
|
173
|
+
|
|
174
|
+
# GitHub CLI config
|
|
175
|
+
.gh/
|
|
176
|
+
|
|
177
|
+
# Infisical (secrets manager used by bb2gh)
|
|
178
|
+
.infisical.json
|
|
179
|
+
|
|
180
|
+
# Build artifacts
|
|
181
|
+
*.whl
|
|
182
|
+
|
|
183
|
+
# Documentation build
|
|
184
|
+
docs/_build/
|
|
185
|
+
site/
|
|
186
|
+
|
|
187
|
+
# Jupyter
|
|
188
|
+
.ipynb_checkpoints/
|
|
189
|
+
|
|
190
|
+
# profiling
|
|
191
|
+
*.prof
|
bb2gh-0.2.1/LICENSE
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Licensor: N8 Group
|
|
4
|
+
Licensed Work: bb2gh
|
|
5
|
+
The Licensed Work is (c) 2026 N8 Group.
|
|
6
|
+
Change Date: Four years from the release date of each version.
|
|
7
|
+
Change License: Apache License, Version 2.0
|
|
8
|
+
|
|
9
|
+
Usage Grant:
|
|
10
|
+
|
|
11
|
+
You may use the Licensed Work for any purpose, including commercial use,
|
|
12
|
+
provided you do not offer a competing migration service using this software.
|
|
13
|
+
|
|
14
|
+
Additional Use Grant:
|
|
15
|
+
|
|
16
|
+
Internal business use and migrations are always permitted. You may:
|
|
17
|
+
- Use this software to migrate your own organization's repositories
|
|
18
|
+
- Use this software as part of your internal development workflow
|
|
19
|
+
- Modify and create derivative works for internal use
|
|
20
|
+
|
|
21
|
+
What is NOT permitted without a separate commercial license:
|
|
22
|
+
- Offering repository migration as a service to third parties
|
|
23
|
+
- Building a competing SaaS product that uses this software
|
|
24
|
+
- Reselling or sublicensing the migration functionality
|
|
25
|
+
|
|
26
|
+
For commercial licensing inquiries, contact: licensing@n8group.com
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
Terms
|
|
31
|
+
|
|
32
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
33
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
34
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
35
|
+
production use.
|
|
36
|
+
|
|
37
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
38
|
+
available distribution of a specific version of the Licensed Work under this
|
|
39
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
40
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
41
|
+
above terminate.
|
|
42
|
+
|
|
43
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
44
|
+
currently in effect as described in this License, you must purchase a
|
|
45
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
46
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
47
|
+
|
|
48
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
49
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
50
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
51
|
+
for each version of the Licensed Work released by Licensor.
|
|
52
|
+
|
|
53
|
+
You must conspicuously display this License on each original or modified copy
|
|
54
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
55
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
56
|
+
License apply to your use of that work.
|
|
57
|
+
|
|
58
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
59
|
+
terminate your rights under this License for the current and all other
|
|
60
|
+
versions of the Licensed Work.
|
|
61
|
+
|
|
62
|
+
This License does not grant you any right in any trademark or logo of
|
|
63
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
64
|
+
Licensor as expressly required by this License).
|
|
65
|
+
|
|
66
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
67
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
68
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
69
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
70
|
+
TITLE.
|
bb2gh-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bb2gh
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: CLI tool for migrating Bitbucket repositories to GitHub Enterprise
|
|
5
|
+
Project-URL: Documentation, https://n8-group.gitbook.io/bb2gh/
|
|
6
|
+
Project-URL: Homepage, https://bb2gh.dev
|
|
7
|
+
Project-URL: Issues, https://github.com/n8group-oss/bb2gh/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/n8group-oss/bb2gh
|
|
9
|
+
Author-email: N8 Group <oss@n8group.com>
|
|
10
|
+
License: Business Source License 1.1
|
|
11
|
+
|
|
12
|
+
Licensor: N8 Group
|
|
13
|
+
Licensed Work: bb2gh
|
|
14
|
+
The Licensed Work is (c) 2026 N8 Group.
|
|
15
|
+
Change Date: Four years from the release date of each version.
|
|
16
|
+
Change License: Apache License, Version 2.0
|
|
17
|
+
|
|
18
|
+
Usage Grant:
|
|
19
|
+
|
|
20
|
+
You may use the Licensed Work for any purpose, including commercial use,
|
|
21
|
+
provided you do not offer a competing migration service using this software.
|
|
22
|
+
|
|
23
|
+
Additional Use Grant:
|
|
24
|
+
|
|
25
|
+
Internal business use and migrations are always permitted. You may:
|
|
26
|
+
- Use this software to migrate your own organization's repositories
|
|
27
|
+
- Use this software as part of your internal development workflow
|
|
28
|
+
- Modify and create derivative works for internal use
|
|
29
|
+
|
|
30
|
+
What is NOT permitted without a separate commercial license:
|
|
31
|
+
- Offering repository migration as a service to third parties
|
|
32
|
+
- Building a competing SaaS product that uses this software
|
|
33
|
+
- Reselling or sublicensing the migration functionality
|
|
34
|
+
|
|
35
|
+
For commercial licensing inquiries, contact: licensing@n8group.com
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
Terms
|
|
40
|
+
|
|
41
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
42
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
43
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
44
|
+
production use.
|
|
45
|
+
|
|
46
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
47
|
+
available distribution of a specific version of the Licensed Work under this
|
|
48
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
49
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
50
|
+
above terminate.
|
|
51
|
+
|
|
52
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
53
|
+
currently in effect as described in this License, you must purchase a
|
|
54
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
55
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
56
|
+
|
|
57
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
58
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
59
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
60
|
+
for each version of the Licensed Work released by Licensor.
|
|
61
|
+
|
|
62
|
+
You must conspicuously display this License on each original or modified copy
|
|
63
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
64
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
65
|
+
License apply to your use of that work.
|
|
66
|
+
|
|
67
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
68
|
+
terminate your rights under this License for the current and all other
|
|
69
|
+
versions of the Licensed Work.
|
|
70
|
+
|
|
71
|
+
This License does not grant you any right in any trademark or logo of
|
|
72
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
73
|
+
Licensor as expressly required by this License).
|
|
74
|
+
|
|
75
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
76
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
77
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
78
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
79
|
+
TITLE.
|
|
80
|
+
License-File: LICENSE
|
|
81
|
+
Keywords: bitbucket,cli,devops,github,migration
|
|
82
|
+
Classifier: Development Status :: 3 - Alpha
|
|
83
|
+
Classifier: Environment :: Console
|
|
84
|
+
Classifier: Intended Audience :: Developers
|
|
85
|
+
Classifier: Intended Audience :: System Administrators
|
|
86
|
+
Classifier: License :: Other/Proprietary License
|
|
87
|
+
Classifier: Operating System :: OS Independent
|
|
88
|
+
Classifier: Programming Language :: Python :: 3
|
|
89
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
90
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
91
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
92
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
93
|
+
Classifier: Typing :: Typed
|
|
94
|
+
Requires-Python: >=3.11
|
|
95
|
+
Requires-Dist: aiosqlite>=0.20.0
|
|
96
|
+
Requires-Dist: gitpython>=3.1.0
|
|
97
|
+
Requires-Dist: httpx>=0.27.0
|
|
98
|
+
Requires-Dist: posthog>=7.0.0
|
|
99
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
100
|
+
Requires-Dist: pydantic>=2.0.0
|
|
101
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
102
|
+
Requires-Dist: rich>=13.0.0
|
|
103
|
+
Requires-Dist: structlog>=24.0.0
|
|
104
|
+
Requires-Dist: typer>=0.12.0
|
|
105
|
+
Provides-Extra: enterprise
|
|
106
|
+
Requires-Dist: redis>=5.0.0; extra == 'enterprise'
|
|
107
|
+
Requires-Dist: rq>=1.16.0; extra == 'enterprise'
|
|
108
|
+
Provides-Extra: secure
|
|
109
|
+
Requires-Dist: keyring>=25.0.0; extra == 'secure'
|
|
110
|
+
Description-Content-Type: text/markdown
|
|
111
|
+
|
|
112
|
+
# bb2gh
|
|
113
|
+
|
|
114
|
+
[](https://github.com/n8group-oss/bb2gh/actions/workflows/ci.yml)
|
|
115
|
+
[](https://github.com/n8group-oss/bb2gh/actions/workflows/security.yml)
|
|
116
|
+
[](https://n8-group.gitbook.io/bb2gh/)
|
|
117
|
+
[](LICENSE)
|
|
118
|
+
[](https://www.python.org/downloads/)
|
|
119
|
+
|
|
120
|
+
**Bitbucket to GitHub migration tool** - Migrate repositories with full metadata preservation including Pull Requests, comments, user attribution, and secrets.
|
|
121
|
+
|
|
122
|
+
## Features
|
|
123
|
+
|
|
124
|
+
- **Terraform-inspired workflow**: `discover` → `plan` → `migrate` → `validate`
|
|
125
|
+
- **Full metadata preservation**: Git history, branches, tags, PRs, comments, user attribution
|
|
126
|
+
- **LFS support**: Automatic detection and migration of LFS objects
|
|
127
|
+
- **Secrets migration**: Assisted secrets migration via Infisical integration
|
|
128
|
+
- **Enterprise ready**: Supports GitHub Enterprise Cloud, Data Residency, and Enterprise Server
|
|
129
|
+
- **Resilient**: Checkpoint/resume capability, rollback options
|
|
130
|
+
|
|
131
|
+
## Requirements
|
|
132
|
+
|
|
133
|
+
- Python >= 3.11
|
|
134
|
+
- Git and git-lfs available in PATH
|
|
135
|
+
|
|
136
|
+
## Installation
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Using pip
|
|
140
|
+
pip install bb2gh
|
|
141
|
+
|
|
142
|
+
# Using pipx (recommended for CLI tools)
|
|
143
|
+
pipx install bb2gh
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Setup
|
|
147
|
+
|
|
148
|
+
### Option 1: Interactive login (recommended)
|
|
149
|
+
|
|
150
|
+
The fastest way to get started. Stores secrets securely in your OS keychain:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Install with keyring support
|
|
154
|
+
pip install bb2gh[secure]
|
|
155
|
+
|
|
156
|
+
# Run interactive setup — prompts for Bitbucket and GitHub credentials
|
|
157
|
+
bb2gh auth login
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The login flow will:
|
|
161
|
+
1. Ask for your Bitbucket username and API token (or OAuth2 credentials)
|
|
162
|
+
2. Ask for your GitHub personal access token (or GitHub App details)
|
|
163
|
+
3. Validate credentials against the APIs
|
|
164
|
+
4. Store secrets in your OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service)
|
|
165
|
+
5. Save non-secret config to `~/.bb2gh/config.yaml`
|
|
166
|
+
|
|
167
|
+
Verify your setup:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
bb2gh auth status
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Option 2: Environment variables (CI/CD)
|
|
174
|
+
|
|
175
|
+
For headless environments, pipelines, or Docker:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Bitbucket — create an API token at:
|
|
179
|
+
# https://id.atlassian.com/manage-profile/security/api-tokens
|
|
180
|
+
export BB_USERNAME=your-username
|
|
181
|
+
export BB_API_TOKEN=your-api-token
|
|
182
|
+
|
|
183
|
+
# GitHub — create a fine-grained PAT at:
|
|
184
|
+
# https://github.com/settings/personal-access-tokens/new
|
|
185
|
+
export GH_TOKEN=ghp_your-token
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
> **Note**: Bitbucket App Passwords are deprecated and will stop working in June 2026. Use API tokens instead — they work the same way (HTTP Basic auth) with the same username. See the [Authentication Guide](https://n8-group.gitbook.io/bb2gh/getting-started/authentication) for details.
|
|
189
|
+
|
|
190
|
+
### Required permissions
|
|
191
|
+
|
|
192
|
+
**Bitbucket API token scopes**: `repository:read`, `pullrequest:read`
|
|
193
|
+
|
|
194
|
+
**GitHub PAT permissions**: Contents (write), Pull requests (write), Administration (write), Metadata (read)
|
|
195
|
+
|
|
196
|
+
## Quick Start
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# 1. Discover your Bitbucket workspace
|
|
200
|
+
bb2gh discover --workspace my-company --output inventory.json
|
|
201
|
+
|
|
202
|
+
# 2. Generate a migration plan
|
|
203
|
+
bb2gh plan --inventory inventory.json --target-org my-gh-org --output plan.json
|
|
204
|
+
|
|
205
|
+
# 3. Execute the migration
|
|
206
|
+
bb2gh migrate --plan plan.json
|
|
207
|
+
|
|
208
|
+
# 4. Validate the migration
|
|
209
|
+
bb2gh validate --migration mig_xxx
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Development
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Clone the repository
|
|
216
|
+
git clone https://github.com/n8group-oss/bb2gh.git
|
|
217
|
+
cd bb2gh
|
|
218
|
+
|
|
219
|
+
# Install Hatch (build system / environment manager)
|
|
220
|
+
pip install hatch
|
|
221
|
+
|
|
222
|
+
# Create the development environment (installs Python 3.11+ and all dependencies)
|
|
223
|
+
hatch env create
|
|
224
|
+
|
|
225
|
+
# Install pre-commit hooks
|
|
226
|
+
hatch run pre-commit install
|
|
227
|
+
|
|
228
|
+
# Run tests
|
|
229
|
+
hatch run test
|
|
230
|
+
|
|
231
|
+
# Run tests with coverage
|
|
232
|
+
hatch run test-cov
|
|
233
|
+
|
|
234
|
+
# Run linting
|
|
235
|
+
hatch run lint
|
|
236
|
+
|
|
237
|
+
# Run type checking
|
|
238
|
+
hatch run type-check
|
|
239
|
+
|
|
240
|
+
# Run all checks (lint + format-check + type-check + tests)
|
|
241
|
+
hatch run all
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Documentation
|
|
245
|
+
|
|
246
|
+
Full documentation is available at **[n8-group.gitbook.io/bb2gh](https://n8-group.gitbook.io/bb2gh/)**
|
|
247
|
+
|
|
248
|
+
- [Getting Started Guide](https://n8-group.gitbook.io/bb2gh/getting-started/installation)
|
|
249
|
+
- [Command Reference](https://n8-group.gitbook.io/bb2gh/commands)
|
|
250
|
+
- [Configuration Reference](https://n8-group.gitbook.io/bb2gh/getting-started/configuration)
|
|
251
|
+
- [User Mapping Guide](https://n8-group.gitbook.io/bb2gh/guides/user-mapping)
|
|
252
|
+
- [Enterprise Features](https://n8-group.gitbook.io/bb2gh/guides/enterprise)
|
|
253
|
+
|
|
254
|
+
## License
|
|
255
|
+
|
|
256
|
+
Business Source License 1.1 - see [LICENSE](LICENSE) for details.
|
|
257
|
+
|
|
258
|
+
The license allows free use for any purpose except offering a competing migration service. After 4 years from each release, that version converts to Apache 2.0.
|
|
259
|
+
|
|
260
|
+
## Contributing
|
|
261
|
+
|
|
262
|
+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) before submitting a PR.
|
bb2gh-0.2.1/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# bb2gh
|
|
2
|
+
|
|
3
|
+
[](https://github.com/n8group-oss/bb2gh/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/n8group-oss/bb2gh/actions/workflows/security.yml)
|
|
5
|
+
[](https://n8-group.gitbook.io/bb2gh/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
|
|
9
|
+
**Bitbucket to GitHub migration tool** - Migrate repositories with full metadata preservation including Pull Requests, comments, user attribution, and secrets.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Terraform-inspired workflow**: `discover` → `plan` → `migrate` → `validate`
|
|
14
|
+
- **Full metadata preservation**: Git history, branches, tags, PRs, comments, user attribution
|
|
15
|
+
- **LFS support**: Automatic detection and migration of LFS objects
|
|
16
|
+
- **Secrets migration**: Assisted secrets migration via Infisical integration
|
|
17
|
+
- **Enterprise ready**: Supports GitHub Enterprise Cloud, Data Residency, and Enterprise Server
|
|
18
|
+
- **Resilient**: Checkpoint/resume capability, rollback options
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- Python >= 3.11
|
|
23
|
+
- Git and git-lfs available in PATH
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Using pip
|
|
29
|
+
pip install bb2gh
|
|
30
|
+
|
|
31
|
+
# Using pipx (recommended for CLI tools)
|
|
32
|
+
pipx install bb2gh
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Setup
|
|
36
|
+
|
|
37
|
+
### Option 1: Interactive login (recommended)
|
|
38
|
+
|
|
39
|
+
The fastest way to get started. Stores secrets securely in your OS keychain:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install with keyring support
|
|
43
|
+
pip install bb2gh[secure]
|
|
44
|
+
|
|
45
|
+
# Run interactive setup — prompts for Bitbucket and GitHub credentials
|
|
46
|
+
bb2gh auth login
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The login flow will:
|
|
50
|
+
1. Ask for your Bitbucket username and API token (or OAuth2 credentials)
|
|
51
|
+
2. Ask for your GitHub personal access token (or GitHub App details)
|
|
52
|
+
3. Validate credentials against the APIs
|
|
53
|
+
4. Store secrets in your OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service)
|
|
54
|
+
5. Save non-secret config to `~/.bb2gh/config.yaml`
|
|
55
|
+
|
|
56
|
+
Verify your setup:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bb2gh auth status
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Option 2: Environment variables (CI/CD)
|
|
63
|
+
|
|
64
|
+
For headless environments, pipelines, or Docker:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Bitbucket — create an API token at:
|
|
68
|
+
# https://id.atlassian.com/manage-profile/security/api-tokens
|
|
69
|
+
export BB_USERNAME=your-username
|
|
70
|
+
export BB_API_TOKEN=your-api-token
|
|
71
|
+
|
|
72
|
+
# GitHub — create a fine-grained PAT at:
|
|
73
|
+
# https://github.com/settings/personal-access-tokens/new
|
|
74
|
+
export GH_TOKEN=ghp_your-token
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> **Note**: Bitbucket App Passwords are deprecated and will stop working in June 2026. Use API tokens instead — they work the same way (HTTP Basic auth) with the same username. See the [Authentication Guide](https://n8-group.gitbook.io/bb2gh/getting-started/authentication) for details.
|
|
78
|
+
|
|
79
|
+
### Required permissions
|
|
80
|
+
|
|
81
|
+
**Bitbucket API token scopes**: `repository:read`, `pullrequest:read`
|
|
82
|
+
|
|
83
|
+
**GitHub PAT permissions**: Contents (write), Pull requests (write), Administration (write), Metadata (read)
|
|
84
|
+
|
|
85
|
+
## Quick Start
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1. Discover your Bitbucket workspace
|
|
89
|
+
bb2gh discover --workspace my-company --output inventory.json
|
|
90
|
+
|
|
91
|
+
# 2. Generate a migration plan
|
|
92
|
+
bb2gh plan --inventory inventory.json --target-org my-gh-org --output plan.json
|
|
93
|
+
|
|
94
|
+
# 3. Execute the migration
|
|
95
|
+
bb2gh migrate --plan plan.json
|
|
96
|
+
|
|
97
|
+
# 4. Validate the migration
|
|
98
|
+
bb2gh validate --migration mig_xxx
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Clone the repository
|
|
105
|
+
git clone https://github.com/n8group-oss/bb2gh.git
|
|
106
|
+
cd bb2gh
|
|
107
|
+
|
|
108
|
+
# Install Hatch (build system / environment manager)
|
|
109
|
+
pip install hatch
|
|
110
|
+
|
|
111
|
+
# Create the development environment (installs Python 3.11+ and all dependencies)
|
|
112
|
+
hatch env create
|
|
113
|
+
|
|
114
|
+
# Install pre-commit hooks
|
|
115
|
+
hatch run pre-commit install
|
|
116
|
+
|
|
117
|
+
# Run tests
|
|
118
|
+
hatch run test
|
|
119
|
+
|
|
120
|
+
# Run tests with coverage
|
|
121
|
+
hatch run test-cov
|
|
122
|
+
|
|
123
|
+
# Run linting
|
|
124
|
+
hatch run lint
|
|
125
|
+
|
|
126
|
+
# Run type checking
|
|
127
|
+
hatch run type-check
|
|
128
|
+
|
|
129
|
+
# Run all checks (lint + format-check + type-check + tests)
|
|
130
|
+
hatch run all
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Documentation
|
|
134
|
+
|
|
135
|
+
Full documentation is available at **[n8-group.gitbook.io/bb2gh](https://n8-group.gitbook.io/bb2gh/)**
|
|
136
|
+
|
|
137
|
+
- [Getting Started Guide](https://n8-group.gitbook.io/bb2gh/getting-started/installation)
|
|
138
|
+
- [Command Reference](https://n8-group.gitbook.io/bb2gh/commands)
|
|
139
|
+
- [Configuration Reference](https://n8-group.gitbook.io/bb2gh/getting-started/configuration)
|
|
140
|
+
- [User Mapping Guide](https://n8-group.gitbook.io/bb2gh/guides/user-mapping)
|
|
141
|
+
- [Enterprise Features](https://n8-group.gitbook.io/bb2gh/guides/enterprise)
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
Business Source License 1.1 - see [LICENSE](LICENSE) for details.
|
|
146
|
+
|
|
147
|
+
The license allows free use for any purpose except offering a competing migration service. After 4 years from each release, that version converts to Apache 2.0.
|
|
148
|
+
|
|
149
|
+
## Contributing
|
|
150
|
+
|
|
151
|
+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) before submitting a PR.
|