Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert search query #42

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion sources/handlers/GithubTaskHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def dev_team_escalation_update(self, app_context, node_id):
project_item_assignees = 'No one.'

# Search for Slack thread based on channel, author and itemId part of the GitHub link
query = 'itemId=' + str(project_item_details["databaseId"]) + ' in:dev-team-escalation from:TB-TT'
query = 'itemId=' + str(project_item_details["databaseId"]) + ' in:dev-team-escalation from:tbtt'
found_slack_messages = self.slack_message_factory.search_message(app_context, query)
slack_thread = found_slack_messages["messages"]["matches"][0]
# Maybe update the thread parent
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/GithubTaskHandlerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def test_process_update_dev_team_escalation_full(mock_post_reply, mock_edit_mess
call_get_project_item = [call('app_context', 'the_node_id')]
mock_get_project_item_for_update.assert_has_calls(call_get_project_item)
mock_get_dev_team_escalation_item_update.assert_has_calls(call_get_project_item)
call_search_message = [call('app_context', 'itemId=123456 in:dev-team-escalation from:TB-TT')]
call_search_message = [call('app_context', 'itemId=123456 in:dev-team-escalation from:tbtt')]
mock_search_message.assert_has_calls(call_search_message)
call_edit_message = [call('app_context', 'C12345678', '1508795665.000236',
'The first line\nStatus: In Progress\nAssignees: MathieuLamiot, theOtherOne, ')]
Expand Down Expand Up @@ -413,7 +413,7 @@ def test_process_update_dev_team_escalation_no_update(mock_post_reply, mock_edit
call_get_project_item = [call('app_context', 'the_node_id')]
mock_get_project_item_for_update.assert_has_calls(call_get_project_item)
mock_get_dev_team_escalation_item_update.assert_has_calls(call_get_project_item)
call_search_message = [call('app_context', 'itemId=123456 in:dev-team-escalation from:TB-TT')]
call_search_message = [call('app_context', 'itemId=123456 in:dev-team-escalation from:tbtt')]
mock_search_message.assert_has_calls(call_search_message)

mock_edit_message.assert_not_called()
Expand Down Expand Up @@ -494,7 +494,7 @@ def test_process_update_dev_team_escalation_no_assignees(mock_post_reply, mock_e
call_get_project_item = [call('app_context', 'the_node_id')]
mock_get_project_item_for_update.assert_has_calls(call_get_project_item)
mock_get_dev_team_escalation_item_update.assert_has_calls(call_get_project_item)
call_search_message = [call('app_context', 'itemId=123456 in:dev-team-escalation from:TB-TT')]
call_search_message = [call('app_context', 'itemId=123456 in:dev-team-escalation from:tbtt')]
mock_search_message.assert_has_calls(call_search_message)
call_edit_message = [call('app_context', 'C12345678', '1508795665.000236',
'The first line\nStatus: In Progress\nAssignees: No one.')]
Expand Down