Skip to content

Commit b02df94

Browse files
committed
Remove autolabelling example
1 parent 306a03f commit b02df94

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/pr_processor.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
LABEL_AUTOMERGE_NO_PROJECT,
2020
LABEL_AUTOMERGE_CONFLICT,
2121
LABEL_SAFE_FOR_AUTOMERGE,
22-
LABEL_AUTOMERGE_SAFE_EXAMPLE,
2322
COMMENT_ATLANTIS_PLAN,
2423
COMMENT_ATLANTIS_UNLOCK,
2524
COMMENT_IGNORE_AUTOMERGE,
@@ -41,7 +40,6 @@
4140
LABEL_AUTOMERGE_NO_PROJECT,
4241
LABEL_AUTOMERGE_CONFLICT,
4342
LABEL_SAFE_FOR_AUTOMERGE,
44-
LABEL_AUTOMERGE_SAFE_EXAMPLE,
4543
COMMENT_ATLANTIS_PLAN,
4644
COMMENT_ATLANTIS_UNLOCK,
4745
COMMENT_IGNORE_AUTOMERGE,
@@ -749,10 +747,6 @@ def process_prs(self, all_pulls: List[Dict[str, Any]], force: bool) -> None:
749747
if pr_list_no_changes:
750748
logger.info("Merging what's possible")
751749
self.github_client.merge_pull_req(pr_list_no_changes)
752-
# Add safe example label to merged PRs
753-
self.github_client.set_label_to_pull_request(
754-
pr_list_no_changes, LABEL_AUTOMERGE_SAFE_EXAMPLE
755-
)
756750

757751
if list_dismissed:
758752
logger.info(

tests/test_pr_processor.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,7 @@ def test_full_workflow_typical_scenario(self):
676676
self.mock_client.multi_comments_pull_req.assert_called_once_with(
677677
[pr_with_diffs], COMMENT_ATLANTIS_UNLOCK, COMMENT_IGNORE_AUTOMERGE
678678
)
679-
# Verify set_label_to_pull_request is called twice:
680-
# Once for safe example label on merged PR, once for automerge ignore on PR with diffs
681-
assert self.mock_client.set_label_to_pull_request.call_count == 2
682-
from src.utils import LABEL_AUTOMERGE_SAFE_EXAMPLE
683-
self.mock_client.set_label_to_pull_request.assert_any_call(
684-
[pr_no_changes], LABEL_AUTOMERGE_SAFE_EXAMPLE
685-
)
686-
self.mock_client.set_label_to_pull_request.assert_any_call(
679+
self.mock_client.set_label_to_pull_request.assert_called_once_with(
687680
[pr_with_diffs], LABEL_AUTOMERGE_IGNORE
688681
)
689682

0 commit comments

Comments
 (0)