zulip / zulipbot

GitHub workflow-optimizing bot by @zulip
Other
84 stars 65 forks source link

Fix shortening of allowed inactivity on an issue from 14 to 4 days after the first warning. #194

Closed garg3133 closed 3 years ago

garg3133 commented 3 years ago

There is a bug in Zulipbot due to which once a warning message is posted on an issue, every new contributor who claims the issue gets unassigned from the issue after only 4 days of inactivity, without any warning.

On closely inspecting the cause of the bug, I found that when the Zulipbot unassigns someone from the issue, it also edits the warning message sent before from inactiveWarning template to abandonWarning template. And for the next time, it just looks for the inactiveWarning comment in the issue and if it finds this comment in the issue after 4 days of inactivity, it assumes that that comment was posted recently by Zulipbot after 10 days of inactivity and hence unassigns the issue assuming the user has been inactive from the last 14days.

This whole problem is occurring due to the use of a deprecated API method, editComment.

Thus, this PR replaces the deprecated editComment method with updateComment method.

andersk commented 3 years ago

I changed editComment to updateComment in 476062a64f53b26fdf6d43167a9f46e4f1e74b36.