Skip to content

[Hivemind] Refactor Github issue extraction functions to object orientated code #98

@cyri113

Description

@cyri113

Part of the Github Vectorize (Summary). Please read this document before starting.

This task consists or refactoring a part of the code from functional programming to object-orientated code.

The following changes should be implemented in dags/hivemind_etl_helpers/src/db/github/extract.

### Tasks
- [x] Create a class `GithubIssueExtraction`
- [x] Migrate `fetch_raw_issues` to a private method `_fetch_raw_issues` in `GithubIssueExtraction`
- [x] Migrate the `fetch_issues` to a public method `fetch_issues` in `GithubIssueExtraction`
- [x] Make the class `GithubExtraction` inherit `GithubIssueExtraction`
- [x] Update the code base to use the `GithubIssueExtraction.fetch_issues` instead of the `fetch_issues`
- [x] Update the test cases

Note: file coverage should be 100%.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions