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

Smallerfixes #6

Merged
merged 2 commits into from Jan 11, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/constants.py
@@ -1,8 +1,8 @@
# prod
# SPREADSHEET_ID = '1JAZXnfmyx8yQ3yeBcKORfMn9sGot-VzWPHUVPJRhPNg'
SPREADSHEET_ID = '1JAZXnfmyx8yQ3yeBcKORfMn9sGot-VzWPHUVPJRhPNg'

# dev
SPREADSHEET_ID = '1vXVGYBpR4szN5zcee15GBoXKfpqFwG9A82yp2szYdnU'
# SPREADSHEET_ID = '1vXVGYBpR4szN5zcee15GBoXKfpqFwG9A82yp2szYdnU'

# PUBLIC PARAMETERS
# generic parameters
Expand Down
2 changes: 2 additions & 0 deletions common/helpers.py
Expand Up @@ -23,6 +23,8 @@ def split_issues(config, issues, linkToAll, createIssueQuery, extractKey, extrac
splitToCounts = {}
for issue in issues:
val = extractVal(issue, splitBy)
if isinstance(val, list):
val = ", ".join(val)
if val in splitToCounts:
splitToCounts[val].append(extractKey(issue))
else:
Expand Down
4 changes: 1 addition & 3 deletions main.py
Expand Up @@ -370,6 +370,4 @@ def main():
# optimize: the sheet() does not need to be called repeatedly
# format the section titles to be prettier
# add support for conditional formatting (e.g. if the num of bugs is higher than X than make it red)
# formatting inside of cell does not survive a re-render
# add validations of params from the "config" tab - currently the app crashes if something is missing
# the config tab update takes suspiciously long time
# add validations of params from the "config" tab - currently the app crashes if something is missing
12 changes: 5 additions & 7 deletions plugins/jiraplugin.py
Expand Up @@ -46,19 +46,17 @@ def create_query(issueIds):

def init_jira():
try:
opts, args = getopt.getopt(sys.argv[1:], "", ["jirauser=", "jirapass="])
opts, args = getopt.getopt(sys.argv[1:], "", ["jiratoken="])
except getopt.GetoptError:
print('Jira credentials not provided, ignoring plugin. In order to execute the jira plugin, please run the python main.py --jirauser <jira user name> --jirapass <jira password>')
print('Jira credentials not provided, ignoring plugin. In order to execute the jira plugin, please run the python main.py --jiratoken <jira token>')
return []

for opt, arg in opts:
if opt in ("--jirauser"):
user = arg
elif opt in ("--jirapass"):
passwd = arg
if opt in ("--jiratoken"):
jiratoken = arg
for _ in range(3):
try:
return JIRA(server=JIRA_BASE_URL, auth=(user, passwd))
return JIRA(server=JIRA_BASE_URL, token_auth=jiratoken)
except:
# jira likes to fail from time to time and next time it passes. Lets try 3 times
print('longin to jira failed, trying again in 2 seconds')
Expand Down