There are lots of "if" statements switching between issue and PR that we might want to refactor a little later to simplify the logic, but overall this is a good change and we should get it in.
Opened this PR as it was a quick refactor
Summary
Created abstract class in openhands_resolver/issue_definitions.py; IssueHandlerInterface defines an issue handler that must contain the methods get_converted_issues, get_instruction, get_success (functions that previously contained statement switching)
Created IssueHandler which inherits IssueHandlerInterface; this resolves issue-type=issue
Create PRHandler which inherits IssueHandler; this resolves issue-type=pr (inheritance help with modularity)
Refactored test cases in tests/test_resolve_issues.py to work on newly defined classes
This PR addresses the last comment in #174
Opened this PR as it was a quick refactor
Summary
openhands_resolver/issue_definitions.py
;IssueHandlerInterface
defines an issue handler that must contain the methodsget_converted_issues
,get_instruction
,get_success
(functions that previously contained statement switching)IssueHandler
which inheritsIssueHandlerInterface
; this resolvesissue-type=issue
PRHandler
which inheritsIssueHandler
; this resolvesissue-type=pr
(inheritance help with modularity)tests/test_resolve_issues.py
to work on newly defined classes