- Refactored GitHubConnector to utilize gitingest CLI via subprocess, improving performance and avoiding async issues with Celery.
- Updated ingestion method to handle repository digests more efficiently, including error handling for subprocess execution.
- Adjusted GitHub indexer to call the new synchronous ingestion method.
- Clarified documentation regarding the optional nature of the Personal Access Token for public repositories.
- Added gitingest as a dependency to streamline the ingestion of GitHub repositories.
- Refactored GitHubConnector to utilize gitingest for efficient repository digest generation, reducing API calls.
- Updated GitHub indexer to process entire repository digests, enhancing performance and simplifying the indexing process.
- Modified GitHub connect form to indicate that the Personal Access Token is optional for public repositories.
This commit includes two main improvements:
1. Slack Connector (`slack_history.py`):
- Addresses API rate limiting for `conversations.list` by introducing a 3-second delay between paginated calls.
- Implements handling for the `Retry-After` header when HTTP 429 errors occur.
- Fixes a `SyntaxError` caused by a non-printable character accidentally introduced in a previous modification.
- Adds comprehensive unit tests for the rate limiting and retry logic in `test_slack_history.py`.
2. GitHub Connector (`github_connector.py`):
- Modifies `get_user_repositories` to fetch all repositories accessible by you (including organization repositories) by changing the API call parameter from `type='owner'` to `type='all'`.
- Adds unit tests in `test_github_connector.py` to verify this change and other connector functionalities.