diff --git a/sync_jira_actions/sync_issue.py b/sync_jira_actions/sync_issue.py index 9d09959..b0fd28c 100755 --- a/sync_jira_actions/sync_issue.py +++ b/sync_jira_actions/sync_issue.py @@ -446,7 +446,8 @@ def _find_jira_issue(jira, gh_issue, make_new=False, retries=5): """ url = gh_issue['html_url'] jql_query = f'issue in issuesWithRemoteLinksByGlobalId("{url}") order by updated desc' - print(f'JQL query: {jql_query}') + if os.environ.get('ACTIONS_RUNNER_DEBUG') == 'true': + print(f'JQL query: {jql_query}') # Print the JQL query only in debug mode res = jira.search_issues(jql_query) if not res: print(f"WARNING: No JIRA issues have a remote link with globalID '{url}'") diff --git a/sync_jira_actions/sync_to_jira.py b/sync_jira_actions/sync_to_jira.py index 607990a..085101d 100755 --- a/sync_jira_actions/sync_to_jira.py +++ b/sync_jira_actions/sync_to_jira.py @@ -74,7 +74,8 @@ def main(): # The path of the file with the complete webhook event payload. For example, /github/workflow/event.json. with open(os.environ['GITHUB_EVENT_PATH'], 'r', encoding='utf-8') as file: event = json.load(file) - print(json.dumps(event, indent=4)) + if os.environ.get('ACTIONS_RUNNER_DEBUG') == 'true': + print(json.dumps(event, indent=4)) event_name = os.environ['GITHUB_EVENT_NAME']