Skip to content

Commit

Permalink
Added comment for clear description and removed white space
Browse files Browse the repository at this point in the history
  • Loading branch information
karamveer28 committed Aug 12, 2023
1 parent e1230be commit 1769ce3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The sensor monitors for new tickets and sends a trigger into the system whenever
* ``attach_files_to_issue`` - Attach multiple files to JIRA issue / ticket.
* ``bulk_link_issue`` - Link many JIRA issues to another JIRA issue.
* ``bulk_link_multithreading`` - Link many JIRA issues to another JIRA issue using multithreading approach which gives faster results compared to traditional action
* ``bulk_search_issues`` - Search issues based on list of summary and corresponding jql stri
* ``bulk_search_issues`` - Search issues based on list of summary and corresponding jql string
* ``comment_issue`` - Comment on a JIRA issue / ticket.
* ``create_issue`` - Create a new JIRA issue / ticket.
* ``get_issue`` - Retrieve information about a particular JIRA issue.
Expand Down
8 changes: 4 additions & 4 deletions actions/bulk_link_multithreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
from lib.base import BaseJiraAction

class BulkLinkJiraIssueAction(BaseJiraAction):
def link_issues(self,semaphore, issue_key=None, target_issue=None, direction=None, link_type=None):
def link_issues(self, semaphore, issue_key=None, target_issue=None, direction=None, link_type=None):
with semaphore:
if direction == 'outward':
outward_issue_key = issue_key
inward_issue_key = target_issue
issue = self._client.create_issue_link(link_type, inward_issue_key,outward_issue_key)
issue = self._client.create_issue_link(link_type, inward_issue_key, outward_issue_key)

if direction == 'inward':
inward_issue_key = issue_key
outward_issue_key = target_issue
issue = self._client.create_issue_link(link_type, inward_issue_key,outward_issue_key)
issue = self._client.create_issue_link(link_type, inward_issue_key, outward_issue_key)
print(issue)

def run(self, issue_key_list, target_issue, direction, link_type):
Expand All @@ -25,4 +25,4 @@ def run(self, issue_key_list, target_issue, direction, link_type):
x.start()

for thread in threads:
thread.join()
thread.join()
7 changes: 6 additions & 1 deletion actions/bulk_search_issues.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
# For example, if one wants to search existing issues based on following two queries:
# 1. {"type='Bug' AND project = "anyproj" AND summary ~ 'SummaryOne'"} and 2. {"type='Bug' AND project = "anyproj" AND summary ~ 'SummaryTwo'"}
# So in above two jql queries, we want to search existing issues where we have multiple different summaries for jql query string, so instead of executing workflow for each query separately(which was taking lot of time),
# this workflow will take two inputs: 1. list of summary 2. subsequent jql substring
# and then will search all issues based on those different jql queries(resulted due to different summaries) at one run.
name: bulk_search_issues
runner_type: python-script
description: "Receives list of Summary and a single jql query Substring. Joins each Summary with jql substring, and returns a list of lists containing tickets found for each summary & substring pair, e.g in format: [ [ticket1,ticket2,ticket3], [], [ticket4] ]"
description: "Receives list of Summary and a single jql query Substring. Joins each Summary with jql substring, and returns a list of lists containing tickets found for each summary & substring pair, e.g in format: [ [ticket1,ticket2,ticket3], [], [ticket4] ]"
enabled: true
entry_point: bulk_search_issues.py
parameters:
Expand Down

0 comments on commit 1769ce3

Please sign in to comment.