Skip to content

Commit

Permalink
Merge pull request #95 from JohnStrunk/acct-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStrunk authored Jun 4, 2024
2 parents f499755 + fd3d215 commit 1ffe2ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions jira_howto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@
"outputs": [],
"source": [
"# Get a list of the custom fields in this issue by finding all fields that start with \"customfield_\"\n",
"custom_fields = [k for k in issue[\"fields\"].keys() if k.startswith(\"customfield_\")]\n",
"custom_fields = [k for k in issue[\"fields\"].keys()\n",
" if k.startswith(\"customfield_\")]\n",
"for field in custom_fields:\n",
" if issue[\"fields\"].get(field, None) is None:\n",
" continue\n",
Expand Down Expand Up @@ -287,7 +288,7 @@
"metadata": {},
"outputs": [],
"source": [
"jira.user(username=\"assisted-installer-bot\")"
"jira.user(username=\"[email protected]\")"
]
},
{
Expand Down
9 changes: 6 additions & 3 deletions summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,12 @@ def summary_last_updated(issue: Issue) -> datetime:
return last_update

for change in issue.changelog:
if change.author == get_self(
issue.client
).display_name and "Status Summary" in [chg.field for chg in change.changes]:
# This is to prevent regenerating summaries due to the summary bot
# being moved to its own account instead of using mine
if change.author in [
get_self(issue.client).display_name,
"John Strunk",
] and "Status Summary" in [chg.field for chg in change.changes]:
last_update = max(last_update, change.created)

return last_update
Expand Down

0 comments on commit 1ffe2ee

Please sign in to comment.