Implement automatic pagination handling in Gitea issue plugin #121

Open
opened 2025-10-04 00:23:20 +00:00 by tegwick · 0 comments
Owner

Priority: MEDIUM | Effort: 1 day | Dependencies: Issue #120 (completed)

User Story

As a user of the MarkiTect issue management system, I want all issues to be retrieved automatically without pagination limits, so that I don't need to manually handle pagination when listing issues.

Description

The current Gitea issue plugin has a pagination limitation that only returns 50 issues per API call, but the command-line interface should seamlessly retrieve all issues without requiring users to understand or manage pagination.

Technical Implementation

• Modified Files: infrastructure/repositories/gitea_repository.py, markitect/issues/plugins/gitea.py
• Core Changes: Implement automatic pagination iteration in get_issues() method
• Approach: Make multiple API calls internally until all issues are retrieved

Acceptance Criteria

[ ] markitect issues list returns ALL issues (currently missing 4+ issues due to 50-item limit)
[ ] Pagination handling is transparent to CLI users - no pagination parameters needed
[ ] Gitea plugin automatically iterates through all pages internally
[ ] Performance optimization: cache results or implement lazy loading for large issue sets
[ ] Maintain backward compatibility with existing API
[ ] Add configurable maximum limit to prevent runaway queries

Implementation Details

  1. Modify get_issues() method to loop through pages until no more results
  2. Add pagination state tracking within the repository
  3. Implement result aggregation across multiple API calls
  4. Add performance safeguards (max total items, timeout limits)

Resolves pagination limitation discovered during Issue #120 implementation.

**Priority**: MEDIUM | **Effort**: 1 day | **Dependencies**: Issue #120 (completed) ## User Story As a user of the MarkiTect issue management system, I want all issues to be retrieved automatically without pagination limits, so that I don't need to manually handle pagination when listing issues. ## Description The current Gitea issue plugin has a pagination limitation that only returns 50 issues per API call, but the command-line interface should seamlessly retrieve all issues without requiring users to understand or manage pagination. ## Technical Implementation • Modified Files: infrastructure/repositories/gitea_repository.py, markitect/issues/plugins/gitea.py • Core Changes: Implement automatic pagination iteration in get_issues() method • Approach: Make multiple API calls internally until all issues are retrieved ## Acceptance Criteria [ ] markitect issues list returns ALL issues (currently missing 4+ issues due to 50-item limit) [ ] Pagination handling is transparent to CLI users - no pagination parameters needed [ ] Gitea plugin automatically iterates through all pages internally [ ] Performance optimization: cache results or implement lazy loading for large issue sets [ ] Maintain backward compatibility with existing API [ ] Add configurable maximum limit to prevent runaway queries ## Implementation Details 1. Modify get_issues() method to loop through pages until no more results 2. Add pagination state tracking within the repository 3. Implement result aggregation across multiple API calls 4. Add performance safeguards (max total items, timeout limits) ## Related Issues Resolves pagination limitation discovered during Issue #120 implementation.
tegwick added this to the Improvements project 2025-10-14 22:21:52 +00:00
Sign in to join this conversation.