Repo::forIssues() misses some issues when closing issues #1

Closed
opened 2019-08-16 19:54:49 +01:00 by jhodges · 4 comments
Owner
$repo->forIssues(function($issue){
  $issue->state='closed';
  $issue->save();
});

as the issues get closed, more appear on the page, which means they dissapear of the next page so they essentially get missed from the loop where forIssues loops c468275075/src/Repo.php (L16)

```php $repo->forIssues(function($issue){ $issue->state='closed'; $issue->save(); }); ``` as the issues get closed, more appear on the page, which means they dissapear of the next page so they essentially get missed from the loop where forIssues loops https://git.jhodges.co.uk/james/GiteaBot/src/commit/c4682750757ac794a5ac2196d3da8273bd726270/src/Repo.php#L16
jhodges changed title from forIssues() misses some issues when closing issues to Repo::forIssues() misses some issues when closing issues 2019-08-16 19:56:44 +01:00
Author
Owner

This is by design.

https://github.com/go-gitea/gitea/issues/8022

Either account for this in the app using this library. Or maybe implement some sort of delayed write / cache.

This is by design. https://github.com/go-gitea/gitea/issues/8022 Either account for this in the app using this library. Or maybe implement some sort of delayed write / cache.
Author
Owner

Think this is still needed. The forIssues() function can miss a lot when changing labels, titles, deleting etc. See the delete_* examples.

Maybe we do load all into memory before processing.

Think this is still needed. The forIssues() function can miss a lot when changing labels, titles, deleting etc. See the delete_* examples. Maybe we do load all into memory before processing.
jhodges reopened this issue 2019-09-05 18:02:11 +01:00
Author
Owner

Maybe we leave forIssues() as it is, and add a new getIssues() that will fetch and return them all!? Then the user has a choice.

Maybe we leave forIssues() as it is, and add a new getIssues() that will fetch and return them all!? Then the user has a choice.
jhodges referenced this issue from a commit 2019-09-07 09:06:04 +01:00
Author
Owner

Done on develop. Will be in v1.2.1

Done on develop. Will be in v1.2.1
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jhodges/GiteaBot#1
No description provided.