Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Issue 'locked' event doesn't update the Issue itself

I'm using GitHub API v3 to connect to a repository and get the list of issues that were update/created since a specific date. I use these parameters to get a filtered result:

  • filter: all
  • labels: bug
  • state: all
  • sort: updated
  • direction: ascendent
  • since: date

If i find any result, for each issue I get the issue events that triggered a change (filtering for the ones that happened since date).

Everything works fine for every issue event except for locked and unlocked events that, for some reason, don't update the issue updated field.

This leads to the inability to get then the list of issues that were updated since that specific date and therefore I don't check for the issue events.

Questions:

  1. Is there a reason why these two events don't update the issue?
  2. Is there an acceptable solution, except for the one where I should get all the issues and query them manually?
like image 380
Advicer Avatar asked Aug 12 '15 07:08

Advicer


1 Answers

As of today (4th of October, 2015), I cannot reproduce this issue. If it was reproducible when the question was posted, probably it was a bug, not a feature.

Is there a reason why these two events don't update the issue?

They do update the issue (see the updated_at field) and the since parameter works fine.

Is there an acceptable solution, except for the one where I should get all the issues and query them manually?

Just use the since parameter, the way how it is supposed to work, but keep in mind the timezone could be different. Since you're in Romania (like me! :-)) and your server could be into another timezone, you may want to modify the date to match the Romanian time. That's most probably your issue. Just add/substract few hours and see if that helps.

curling the issues, I cannot reproduce the behavior you have.

On the other side, you may want to use the locked parameter which is anyway updated.

like image 72
Ionică Bizău Avatar answered Nov 06 '22 12:11

Ionică Bizău