issue.updatedAt not updated when a comment is modified


#1

When an existing comment on an issue (or pullRequest) is modified, then issue.updatedAt is not modified.

This is unfortunate because I was using that field to determine whether an issue has to be re-fetched. Furthermore I order issues by that field and was only fetching issues until encountering an issue whose updatedAt is smaller than the highest updatedAt of the locally cached issues.

Now that I have learned that issue.updatedAt is not necessarily updated when the issue is updated, I have to discard the respective code and fetch all issues every time the user requests that the local cache should be updated to reflect what is on github. That’s problematic when there are a few thousand issues.

I believe this is a bug. When adding a new comment on an issue for example, then that does bump the issue.updatedAt field, so I don’t think the intention is to only update that field when the original issue post itself changes.

There are other events that should cause a bump but don’t, e.g.: Issue.updatedAt not updated if Project Column changed. Unfortunately that issue has not seen any update since the initial “I will reach out to the team”.

Thanks for looking into this.


#2

Hi @tarsius! Thanks for opening this discussion.

That’s a great point and I appreciate you bringing it to the team’s attention.

That does sound less than ideal. I’ve opened an issue internally and am chatting for the team to discuss. We’ll reply back as we learn more.


#3

Thanks!

A correction: This does not happen for issue.updatedAt at, but it does happen for pullRequest.updatedAt.

I should also mention that I used the web interface as well as the rest api to edit comments on pull requests and in both cases the field was not updated.