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

feat: issue task control #327

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feat: issue task control #327

wants to merge 4 commits into from

Conversation

MadratJerry
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 11:49pm

Copy link

Walkthrough

This PR introduces enhancements to the issue task control mechanism, including the addition of new task types and improved handling of GitHub issues. It also refines the task creation and status update processes.

Changes

File Summary
petercat_utils/data_class.py Added a new enum value ISSUE_PAGE to GitIssueTaskNodeType.
petercat_utils/rag_helper/git_issue_task.py Introduced create_rag_git_issue_task function, added page_index attribute to GitIssueTask, and enhanced issue handling logic.
petercat_utils/rag_helper/task.py Updated import statements and replaced direct GitIssueTask instantiation with create_rag_git_issue_task function.
subscriber/handler.py Added a debug print statement to log the event batch size.


return self.update_status(TaskStatus.COMPLETED)

def handle_issue_page_node(self):

Choose a reason for hiding this comment

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

The handle_issue_page_node method does not handle the case where repo.get_issues(state='all').get_page(self.page_index) returns an empty list. This could lead to potential errors when processing issues.


existing_issue_ids = {int(issue['issue_id']) for issue in existing_issues.data}

new_task_list = [item for item in task_list if item['issue_id'] not in existing_issue_ids]

Choose a reason for hiding this comment

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

The new_task_list is created without checking if task_list is empty. This could lead to unnecessary database operations if task_list is empty.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 20.51282% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
petercat_utils/rag_helper/git_issue_task.py 16.66% 30 Missing ⚠️
petercat_utils/rag_helper/task.py 50.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
petercat_utils/data_class.py 100.00% <100.00%> (ø)
petercat_utils/rag_helper/task.py 48.71% <50.00%> (ø)
petercat_utils/rag_helper/git_issue_task.py 26.47% <16.66%> (-7.68%) ⬇️

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.

1 participant