From 4b0345a5772706e345e4a12af5fd4e534210f345 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Tue, 21 May 2024 12:42:07 +0530 Subject: [PATCH] chore: remove unwanted changes --- .../integrations/linear_controller.rb | 2 +- .../dashboard/api/integrations/linear.js | 4 ---- .../components/buttons/ResolveAction.vue | 21 +------------------ 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/app/controllers/api/v1/accounts/integrations/linear_controller.rb b/app/controllers/api/v1/accounts/integrations/linear_controller.rb index a82b386e8..1d09f3f7c 100644 --- a/app/controllers/api/v1/accounts/integrations/linear_controller.rb +++ b/app/controllers/api/v1/accounts/integrations/linear_controller.rb @@ -88,6 +88,6 @@ class Api::V1::Accounts::Integrations::LinearController < Api::V1::Accounts::Bas end def permitted_params - params.permit(:team_id, :conversation_id, :issue_id, :comment, :link_id, :title, :description, :assignee_id, :priority, label_ids: []) + params.permit(:team_id, :conversation_id, :issue_id, :link_id, :title, :description, :assignee_id, :priority, label_ids: []) end end diff --git a/app/javascript/dashboard/api/integrations/linear.js b/app/javascript/dashboard/api/integrations/linear.js index 6e0c70a97..41008278b 100644 --- a/app/javascript/dashboard/api/integrations/linear.js +++ b/app/javascript/dashboard/api/integrations/linear.js @@ -41,10 +41,6 @@ class LinearAPI extends ApiClient { searchIssues(query) { return axios.get(`${this.url}/search_issue?q=${query}`); } - - createComment(data) { - return axios.post(`${this.url}/create_comment`, data); - } } export default new LinearAPI(); diff --git a/app/javascript/dashboard/components/buttons/ResolveAction.vue b/app/javascript/dashboard/components/buttons/ResolveAction.vue index bc16539af..20b6e386a 100644 --- a/app/javascript/dashboard/components/buttons/ResolveAction.vue +++ b/app/javascript/dashboard/components/buttons/ResolveAction.vue @@ -94,7 +94,6 @@ import keyboardEventListenerMixins from 'shared/mixins/keyboardEventListenerMixi import { findSnoozeTime } from 'dashboard/helper/snoozeHelpers'; import WootDropdownItem from 'shared/components/ui/dropdown/DropdownItem.vue'; import WootDropdownMenu from 'shared/components/ui/dropdown/DropdownMenu.vue'; -import LinearAPI from 'dashboard/api/integrations/linear'; import wootConstants from 'dashboard/constants/globals'; import { @@ -120,10 +119,7 @@ export default { }; }, computed: { - ...mapGetters({ - currentChat: 'getSelectedChat', - currentUser: 'getCurrentUser', - }), + ...mapGetters({ currentChat: 'getSelectedChat' }), isOpen() { return this.currentChat.status === wootConstants.STATUS_TYPE.OPEN; }, @@ -252,7 +248,6 @@ export default { snoozedUntil, }) .then(() => { - this.updateLinearComment(status); this.showAlert(this.$t('CONVERSATION.CHANGE_STATUS')); this.isLoading = false; }); @@ -261,20 +256,6 @@ export default { const ninja = document.querySelector('ninja-keys'); ninja.open({ parent: 'snooze_conversation' }); }, - async updateLinearComment(status) { - if (status !== 'resolved') { - return; - } - const response = await LinearAPI.getLinkedIssue(this.currentChat.id); - const { data: issues } = response; - const linkedIssue = issues && issues.length ? issues[0] : null; - if (linkedIssue) { - await LinearAPI.createComment({ - issue_id: linkedIssue.issue.id, - comment: `*The conversation has been resolved by **${this.currentUser.name}***`, - }); - } - }, }, };