Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
handle_bitrise_builds,
)

"""
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commenting this out for now only because its throwing an error locally

from handlers.bugzilla import (
handle_bugzilla_desktop_bugs,
handle_bugzilla_desktop_release_flags_for_bugs,
handle_bugzilla_meta_bugs,
handle_bugzilla_qe_verify,
handle_bugzilla_query_by_keyword,
)
"""

from handlers.confluence import (
handle_confluence_build_validation,
Expand All @@ -53,6 +55,7 @@
handle_testrail_test_plans_and_runs,
handle_testrail_test_results,
handle_testrail_milestones,
handle_testrail_milestones_closed,
handle_testrail_users,
handle_testrail_test_case_coverage,
# handle_testrail_test_run_counts_update,
Expand Down Expand Up @@ -111,7 +114,7 @@ def parse_args(cmdln_args):
def validate_project(platform, project, report_type):
# Conditionally require --platform and --project
# if --report-type is 'test-case-coverage'
if report_type in ('test-case-coverage', 'testrail-milestones'):
if report_type in ('test-case-coverage', 'testrail-milestones', 'testrail-milestones-closed'):
if not project:
print("--project is required for the report selected")
if not platform:
Expand Down Expand Up @@ -171,11 +174,11 @@ def expand_project_args(platform, projects):
# === DISPATCH MAP ===
COMMAND_MAP = {
'bitrise-builds': handle_bitrise_builds,
'bugzilla-desktop-bugs': handle_bugzilla_desktop_bugs,
'bugzilla-desktop-release-flags-for-bugs': handle_bugzilla_desktop_release_flags_for_bugs, # noqa
'bugzilla-meta-bugs': handle_bugzilla_meta_bugs,
'bugzilla-qe-verify': handle_bugzilla_qe_verify,
'bugzilla-query-by-keyword': handle_bugzilla_query_by_keyword,
#'bugzilla-desktop-bugs': handle_bugzilla_desktop_bugs,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

#'bugzilla-desktop-release-flags-for-bugs': handle_bugzilla_desktop_release_flags_for_bugs, # noqa
#'bugzilla-meta-bugs': handle_bugzilla_meta_bugs,
#'bugzilla-qe-verify': handle_bugzilla_qe_verify,
#'bugzilla-query-by-keyword': handle_bugzilla_query_by_keyword,
'confluence-updates': handle_confluence_updates,
'confluence-build-validation': handle_confluence_build_validation,
'github-issue-regression': handle_github_issue_regression,
Expand All @@ -185,6 +188,7 @@ def expand_project_args(platform, projects):
'sentry-issues': handle_sentry_issues,
'sentry-rates': handle_sentry_rates,
'testrail-milestones': handle_testrail_milestones,
'testrail-milestones-closed': handle_testrail_milestones_closed,
'testrail-users': handle_testrail_users,
'testrail-test-case-coverage': handle_testrail_test_case_coverage,
# 'testrail-test-run-counts': handle_testrail_test_run_counts_update,
Expand All @@ -203,6 +207,7 @@ def main():
print(f"args.report_type: {args.report_type}")
print(f"args.arg_list: {args.arg_list}")


if report_type not in COMMAND_MAP:
sys.exit(f"Unknown or unsupported report type: {report_type}")

Expand Down
7 changes: 6 additions & 1 deletion api/testrail/report_milestones.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _tr() -> TestRail():
# ORCHESTRATOR (BATCH)
# ===================================================================

def testrail_milestones(project):
def testrail_milestones(project, milestone_validate_closed: bool = False):

tr = _tr()

Expand Down Expand Up @@ -141,6 +141,11 @@ def testrail_milestones(project):
pl.extract_build_version
)

import sys
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIAGNOSTIC only

print(f"milestone_validate_closed: {milestone_validate_closed}")
sys.exit()


# Insert into database only if there is data
if not df_selected.empty:
report_milestones_insert(projects_id, df_selected)
Expand Down
1 change: 1 addition & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
'jira-qa-requests-new-issue-types',
'jira-softvision-worklogs',
'testrail-milestones',
'testrail-milestones-closed',
'testrail-users',
'testrail-test-case-coverage',
'testrail-test-run-counts',
Expand Down
5 changes: 5 additions & 0 deletions handlers/testrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def handle_testrail_milestones(args):
milestones.testrail_milestones(args.arg_list)


def handle_testrail_milestones_closed(args):
milestone_validate_closed = True
Copy link
Collaborator Author

@rpappalax rpappalax Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing it this way, we don't have to make the COMMAND_MAP more complex with additional input params. We simply use a different function name and pass in an optional variable which will trigger an alternate path for the report module we already have in place for milestones

milestones.testrail_milestones(args.arg_list, milestone_validate_closed)


def handle_testrail_users(args):
users.testrail_users()

Expand Down
Loading