ocean
ocean copied to clipboard
Test create cloud GitHub integration implementation
User description
Description
What - An integration to sync GitHub Cloud resources to the Port Platform, including repositories, pull requests, teams, members, and workflow runs.
Why - To allow users to import and track their GitHub Cloud resources on the Port Platform, enabling better visibility and management of their GitHub ecosystem.
How - By implementing a robust integration that:
-
Maps GitHub Cloud resources to Port concepts
-
Handles webhook events for real-time updates
-
Provides resync capabilities for all resource types
-
Supports both organization and repository-level webhooks
-
Implements proper error handling and rate limiting
-
Uses async operations for better performance
-
Includes comprehensive logging and monitoring
Type of change
- [x] New Integration (non-breaking change which adds a new integration)
All tests should be run against the port production environment(using a testing org).
Core testing checklist
- [x] Integration able to create all default resources from scratch
- [x] Resync finishes successfully
- [x] Resync able to create entities
- [x] Resync able to update entities
- [x] Resync able to detect and delete entities
- [ ] Scheduled resync able to abort existing resync and start a new one
- [x] Tested with at least 2 integrations from scratch
- [ ] Tested with Kafka and Polling event listeners
- [ ] Tested deletion of entities that don't pass the selector
Integration testing checklist
- [x] Integration able to create all default resources from scratch
- [x] Resync able to create entities
- [x] Resync able to update entities
- [x] Resync able to detect and delete entities
- [x] Resync finishes successfully
- [x] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the
examplesfolder in the integration directory. - [x] If resource kind is updated, run the integration with the example data and check if the expected result is achieved
- [x] If new resource kind is added or updated, validate that live-events for that resource are working as expected
- [ ] Docs PR link here
Preflight checklist
- [x] Handled rate limiting
- [x] Handled pagination
- [x] Implemented the code in async
- [ ] Support Multi account
Screenshots
API Documentation
- GitHub REST API v3: https://docs.github.com/en/rest
- GitHub Webhooks: https://docs.github.com/en/developers/webhooks-and-events/webhooks
- GitHub GraphQL API: https://docs.github.com/en/graphql The integration supports the following resource types: Repositories Pull Requests Teams with Members Members Workflow Runs Workflow Jobs
PR Type
Enhancement, Tests, Documentation, Other, Configuration changes
Description
-
Implements a comprehensive GitHub Cloud integration for the Port Platform, enabling synchronization and management of repositories, pull requests, teams, members, and workflow runs.
-
Adds robust async clients for interacting with the GitHub Cloud REST API, including authentication, rate limiting, pagination, and resource enrichment.
-
Introduces entity processors for handling file and search references, as well as utilities for file content parsing (JSON, YAML).
-
Implements full resync logic with batch processing, enrichment options, and error handling.
-
Provides webhook event configuration, factories, and processors for real-time updates on repositories and pull requests.
-
Registers integration handlers and startup logic in the main entrypoint.
-
Adds extensive test coverage for clients, entity processors, webhook logic, and utilities using pytest fixtures and isolated mocks.
-
Includes detailed documentation: README, contributing guidelines, and changelog.
-
Adds configuration files for environment variables, Docker, Poetry, Port integration specs, blueprints, and resource mapping.
-
Provides a Makefile for development, CI workflows, and project automation.
Changes walkthrough 📝
| Relevant files | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 20 files
| ||||||||||||||||||||||||||||||||||||||||
| Miscellaneous | 1 files
| ||||||||||||||||||||||||||||||||||||||||
| Tests | 9 files
| ||||||||||||||||||||||||||||||||||||||||
| Documentation | 3 files
| ||||||||||||||||||||||||||||||||||||||||
| Configuration changes | 8 files
| ||||||||||||||||||||||||||||||||||||||||
| Additional files |
Need help?
Type /help how to ...in the comments thread for any questions about Qodo Merge usage.Check out the documentation for more information.