Skip to main content

Posts

Showing posts from October, 2021

JIRA AUTO CLOSE

JRPY import pandas import subprocess import time import logging import sys #Logging Initialization logging.basicConfig (filename=’/data/jira_closure.log’,                                        format='[%( asctime )s {%(pathname)s:%( lineno )d} :%( levelname )s ] \n %(message)s',                datefmt ='%m-%d-%Y %H:%M:%S',                level=logging.INFO,                filemode ='w')   logger= logging.getLogger (__name__) from datetime import datetime,timedelta import json from jira import JIRA,JIRAError from master_key import GETPWD   statTM = datetime.now () pwd =GETPWD() if len ( sys.argv ) > 1:     dry-run = sys.argv [1]     logger.info( f"DEFAULT EXECUTION of { sys.argv [1]} in DRY RUN (FLAG {dry-run})") else:     dry-run ="Y"     logger.info( f"DEFAULT EXECUTION of { sys.argv [1]} in DRY RUN (FLAG {dry-run})")   def close_jira ( jiraTKT,dat...