-
Notifications
You must be signed in to change notification settings - Fork 124
[Integration][AzureDevOps] Add branch kind support #2303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does ADO Support branches live events ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
User description
Description
What
Why
How -
Type of change
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
API Documentation
Provide links to the API documentation used for this integration.
PR Type
Enhancement
Description
Added branch generation and resync functionality to Azure DevOps integration
Implemented
generate_branches()
method to fetch branches from repositoriesAdded
BRANCH
kind to support branch entities in PortCreated resync handler and example mappings for branch resources
Diagram Walkthrough
File Walkthrough
azure_devops_client.py
Add branch generation methods to client
integrations/azure-devops/azure_devops/client/azure_devops_client.py
generate_branches()
async generator to fetch branches from allrepositories
_get_branches_for_repository()
to retrieve and enrichbranch data
refs/heads/
prefix and enriched withrepository context
misc.py
Add branch kind to enum
integrations/azure-devops/azure_devops/misc.py
BRANCH = "branch"
to theKind
enummain.py
Add branch resync handler
integrations/azure-devops/main.py
resync_branches()
handler decorated with@ocean.on_resync(Kind.BRANCH)
generate_branches()
and yields branch batches forresyncing
test_azure_devops_client.py
Add branch generation tests
integrations/azure-devops/tests/azure_devops/client/test_azure_devops_client.py
EXPECTED_BRANCHES_RAW
test data with raw branch referencesEXPECTED_BRANCHES
test data with enriched branch objectsincluding repository and project context
test_generate_branches()
test case with mocked repositoryand branch generation
preservation
example-mappings.yaml
Add branch resource mapping example
integrations/azure-devops/examples/example-mappings.yaml
query:
'true'
branch names
name, and repository URL