|
8 | 8 |
|
9 | 9 | import kombu
|
10 | 10 | from connexion import ProblemException, problem
|
11 |
| -from flask import current_app, g |
| 11 | +from lando import settings |
| 12 | +from flask import g |
12 | 13 |
|
13 |
| -from landoapi import auth |
14 |
| -from landoapi.commit_message import format_commit_message |
15 |
| -from landoapi.decorators import require_phabricator_api_key |
16 |
| -from landoapi.models.landing_job import ( |
| 14 | +from lando.api import auth |
| 15 | +from lando.api.legacy.commit_message import format_commit_message |
| 16 | +from lando.api.legacy.decorators import require_phabricator_api_key |
| 17 | +from lando.main.models.landing_job import ( |
17 | 18 | LandingJob,
|
18 | 19 | LandingJobStatus,
|
19 | 20 | add_revisions_to_job,
|
20 | 21 | )
|
21 |
| -from landoapi.models.revisions import Revision |
22 |
| -from landoapi.phabricator import PhabricatorClient |
23 |
| -from landoapi.projects import ( |
| 22 | +from lando.main.models.revision import Revision |
| 23 | +from lando.api.legacy.phabricator import PhabricatorClient |
| 24 | +from lando.api.legacy.projects import ( |
24 | 25 | CHECKIN_PROJ_SLUG,
|
25 | 26 | get_checkin_project_phid,
|
26 | 27 | get_release_managers,
|
|
30 | 31 | get_testing_tag_project_phids,
|
31 | 32 | project_search,
|
32 | 33 | )
|
33 |
| -from landoapi.repos import ( |
| 34 | +from lando.api.legacy.repos import ( |
34 | 35 | Repo,
|
35 | 36 | get_repos_for_env,
|
36 | 37 | )
|
37 |
| -from landoapi.reviews import ( |
| 38 | +from lando.api.legacy.reviews import ( |
38 | 39 | approvals_for_commit_message,
|
39 | 40 | get_approved_by_ids,
|
40 | 41 | get_collated_reviewers,
|
41 | 42 | reviewers_for_commit_message,
|
42 | 43 | )
|
43 |
| -from landoapi.revisions import ( |
| 44 | +from lando.api.legacy.revisions import ( |
44 | 45 | find_title_and_summary_for_landing,
|
45 | 46 | gather_involved_phids,
|
46 | 47 | get_bugzilla_bug,
|
47 | 48 | revision_is_secure,
|
48 | 49 | select_diff_author,
|
49 | 50 | )
|
50 |
| -from landoapi.stacks import ( |
| 51 | +from lando.api.legacy.stacks import ( |
51 | 52 | RevisionData,
|
52 | 53 | build_stack_graph,
|
53 | 54 | calculate_landable_subgraphs,
|
54 | 55 | get_landable_repos_for_revision_data,
|
55 | 56 | request_extended_revision_data,
|
56 | 57 | )
|
57 |
| -from landoapi.storage import db |
58 |
| -from landoapi.tasks import admin_remove_phab_project |
59 |
| -from landoapi.transplants import ( |
| 58 | +from lando.api.legacy.storage import db |
| 59 | +from lando.api.legacy.tasks import admin_remove_phab_project |
| 60 | +from lando.api.legacy.transplants import ( |
60 | 61 | TransplantAssessment,
|
61 | 62 | check_landing_blockers,
|
62 | 63 | check_landing_warnings,
|
63 | 64 | convert_path_id_to_phid,
|
64 | 65 | get_blocker_checks,
|
65 | 66 | )
|
66 |
| -from landoapi.users import user_search |
67 |
| -from landoapi.validation import ( |
| 67 | +from lando.api.legacy.users import user_search |
| 68 | +from lando.api.legacy.validation import ( |
68 | 69 | parse_landing_path,
|
69 | 70 | revision_id_to_int,
|
70 | 71 | )
|
@@ -145,7 +146,7 @@ def _assess_transplant_request(
|
145 | 146 | stack_data = request_extended_revision_data(phab, list(nodes))
|
146 | 147 | landing_path_phid = convert_path_id_to_phid(landing_path, stack_data)
|
147 | 148 |
|
148 |
| - supported_repos = get_repos_for_env(current_app.config.get("ENVIRONMENT")) |
| 149 | + supported_repos = get_repos_for_env(settings.ENVIRONMENT) |
149 | 150 | landable_repos = get_landable_repos_for_revision_data(stack_data, supported_repos)
|
150 | 151 |
|
151 | 152 | other_checks = get_blocker_checks(
|
@@ -339,7 +340,7 @@ def post(phab: PhabricatorClient, data: dict):
|
339 | 340 | approval_reviewers,
|
340 | 341 | commit_description.summary,
|
341 | 342 | urllib.parse.urljoin(
|
342 |
| - current_app.config["PHABRICATOR_URL"], "D{}".format(revision["id"]) |
| 343 | + settings.PHABRICATOR_URL, "D{}".format(revision["id"]) |
343 | 344 | ),
|
344 | 345 | flags,
|
345 | 346 | )[1]
|
|
0 commit comments