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

fix ignore edited comments bug #459

Merged
merged 2 commits into from
Aug 17, 2022

Conversation

devinburnette
Copy link
Contributor

@devinburnette devinburnette commented Aug 17, 2022

I incorrectly assumed that github would always set updatedAt and submittedAt to be the same upon review comment creation, but apparently that isn't so and it just bit us. Same for createdAt and updatedAt for issue comments.

                "updatedAt": "2022-08-16T18:58:18Z",
                "submittedAt": "2022-08-16T18:58:17Z"

I was able to easily switch out updatedAt for lastEditedAt and it seems to work well. lastEditedAt is just always null until it is actually edited which makes it much easier to discern programmatically. probably should have went with this from the beginning, but who knew?

at least this bug, although annoying, wasn't broken in the other direction by incorrectly counting edited approvals but instead only intermittently not counting appropriate approvals when the ignore option is enabled.

Copy link
Member

@bluekeyes bluekeyes left a comment

Choose a reason for hiding this comment

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

Nice catch, that's a pretty subtle edge case in the API.

@bluekeyes bluekeyes merged commit 65e3549 into palantir:develop Aug 17, 2022
@devinburnette devinburnette deleted the devin-ignore-edits-fix branch August 17, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants