Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion upkeep.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,16 @@ def get_upcoming_workdays(workdays_ahead: int = 2) -> typing.Iterator[datetime.d
# to help ensure the most recent existing e-scrum issue is included even when other
# non e-scrum issues exist
issues = repo.get_issues(state='all', sort='number', direction='desc')
issues = issues[:min(10 + args.workdays_ahead, issues.totalCount)]
# If totalCount is working properly
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding a link to the PR with the bug description or describing it in the comment

if issues.totalCount > 0:
issues = issues[:min(10 + args.workdays_ahead, issues.totalCount)]
else:
# Try reducing the number of issues
try:
issues = issues[:(10 + args.workdays_ahead)]
# But if that's not possible, just continue
except:
pass
Comment on lines +184 to +186
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know more about the error that could occur (i.e. except a specific error) and why it happens?

date_issue_pairs = [(issue_title_to_date(issue.title), issue) for issue in issues]
# Filter issues that are not scrum entries
filtered_date_issue_pairs = [(date, issue) for date, issue in date_issue_pairs if date]
Expand Down
2 changes: 1 addition & 1 deletion uptime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
It has been 885 days since I last had to tinker with the scrum bot.
It has been 0 days since I last had to tinker with the scrum bot.