-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
🎯 Problem Statement
There is a need to enable querying user activity data from GitHub across all repositories and organisations using a structured and reusable method. The current system lacks a dedicated capability to retrieve comprehensive user activity information through GitHub's GraphQL API with proper error handling and logging.
📋 Overview
A new method requires implementation in the GitHubIntegration class to facilitate user activity queries. This method must:
- 🔗 Interface with GitHub's GraphQL API endpoint (
https://api.github.com/graphql) - 📊 Accept customisable variables and query parameters for flexibility
- 🛡️ Implement robust error handling for network and API errors
- 📝 Provide comprehensive logging for debugging and monitoring purposes
- ✅ Validate HTTP response status and parse JSON responses appropriately
The implementation should support querying user activity across all organisations, public and private repositories with custom date ranges and filters.
🎓 Expected Outcome
Upon completion, the system should:
- ✨ Provide a
user_activity_query()method accepting variables dictionary and query string parameters - 📤 Return structured JSON response from GitHub GraphQL API containing search results
- 🚨 Return error dictionary with status and message fields upon failure
- 📍 Maintain consistent error handling patterns with existing codebase methods
- 🔍 Enable users to perform complex activity queries with custom variables (e.g., login, date ranges)