Tool to sync work items and pull requests from Azure DevOps to Asana
Project description
ado-asana-sync
This project aims to synchronize work items and pull requests between Azure DevOps (ADO) and Asana. It's currently in development and not ready for use. Breaking changes will occur as needed.
How to use
- Get the latest container image from the Github Container Registry.
- Configure the environment variables with the relevant values:
ADO_PAT- Your Personal Access Token for ADO to accesst the work items.ADO_URL- The full URL of your Azure DevOps instance.ASANA_TOKEN- Your Personal Access Token for Asana to access the work items.ASANA_WORKSPACE_NAME- Name of the Asana workspace to sync with.CLOSED_STATES- Comma separated list of states that will be considered closed.THREAD_COUNT- Number of projects to sync in parallel. Must be a positive integer.SYNC_THRESHOLD- Number of days to continue syncing closed tasks before removing their mappings (default: 30). Must be a non-negative integer.SLEEP_TIME- Duration in seconds to sleep between sync runs. Must be a positive integer.SYNCED_TAG_NAME- Name of the tag in Asana to append to all synced items. Must be a valid Asana tag name.LOGLEVEL- Console log level (default: INFO). Controls what is shown in the terminal.APPINSIGHTS_LOGLEVEL- Application Insights log level (default: WARNING). Controls minimum level sent to telemetry.APPINSIGHTS_SAMPLE_DEBUG- Sampling rate for DEBUG logs sent to telemetry (default: 0.05 = 5%).APPINSIGHTS_SAMPLE_INFO- Sampling rate for INFO logs sent to telemetry (default: 0.05 = 5%).APPINSIGHTS_SAMPLE_WARNING- Sampling rate for WARNING logs sent to telemetry (default: 1.0 = 100%).APPINSIGHTS_SAMPLE_ERROR- Sampling rate for ERROR logs sent to telemetry (default: 1.0 = 100%).APPINSIGHTS_SAMPLE_CRITICAL- Sampling rate for CRITICAL logs sent to telemetry (default: 1.0 = 100%).
- Run the container with the configured environment variables.
- The application will start syncing work items and pull requests between ADO and Asana based on the configured settings.
Features
Work Item Synchronization
- Synchronizes Azure DevOps work items (User Stories, Bugs, Tasks, etc.) to Asana tasks
- Maintains bidirectional sync for updates, assignments, and status changes
- Automatic user matching between ADO and Asana based on email addresses
- Configurable closed states mapping
Pull Request Synchronization
- Synchronizes active Pull Requests from Azure DevOps to Asana
- Creates separate reviewer tasks for each assigned reviewer
- Task titles follow the format: "Pull Request 5: Update readme (Reviewer Name)"
- Automatic status management:
- Approved reviews (approve/approve with suggestions) → Close Asana task
- Other review states (waiting for author, reject, no vote) → Keep task open
- PR completion/abandonment → Close all reviewer tasks
- Reviewer removal → Close reviewer's task
- Handles reviewer additions, removals, and approval resets
- Syncs PR title changes to Asana task titles
Pull Request Selection Logic
The system follows this logic to determine which PRs to sync:
- Repository Discovery: For each configured ADO project, discover all Git repositories
- Active PR Filtering: Query only PRs with
status="active"(excludes completed/abandoned PRs) - Reviewer Requirements: Only sync PRs that have at least one assigned reviewer
- User Matching: Only create tasks for reviewers who have matching Asana accounts (by email)
- Deduplication: Prevent duplicate reviewer processing by unique email identifier
- Cleanup Processing: Additionally process previously synced PRs that may now be closed/completed
Exclusion Criteria:
- PRs without reviewers are skipped (logs: "No reviewers found for PR X")
- Reviewers not found in Asana are skipped (logs: "PR X: reviewer Y not found in Asana")
- Repositories/projects without Git API access are skipped gracefully
Changelog
See CHANGELOG.md for a detailed history of changes and new features.
Development
Commit message style
This repo uses Conventional Commits to ensure the build numbering is generated correctly
Manual testing
To test the application manually, you can use the following steps:
Work Item Testing
- Create new ADO work item and ensure it is synced to Asana.
- Rename Asana task and ensure it is reverted back to the ADO name.
- Rename ADO task and ensure it is synced to Asana.
- Remove Synced tag from item in Asana and ensure it is replaced.
- Delete synced tag from Asana workspace and from appdata.json file and ensure it is re-created and assigned to all synced tasks.
- Mark Asana task as complete and ensure it is re-opened.
- Mark ADO task as complete and ensure it is marked as complete in Asana.
- Re-open ADO task and ensure it is re-opened in Asana.
Pull Request Testing
- Create new Pull Request in ADO with reviewers and ensure reviewer tasks are created in Asana.
- Change the PR title in ADO and ensure the title updates in Asana tasks on next sync.
- Add a reviewer to the PR and ensure a new task is created for them.
- Remove a reviewer from the PR and ensure their task is closed.
- Remove all reviewers from the PR and ensure all tasks are closed.
- Approve the PR as a reviewer and ensure the reviewer's task is closed.
- Approve with suggestions and ensure the reviewer's task is closed.
- Reject or request changes and ensure the reviewer's task remains open.
- Reset approval and ensure the reviewer's task is reopened.
- Complete/abandon the PR and ensure all reviewer tasks are closed.
Reference
ADO
Asana
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ado_asana_sync-1.25.0.tar.gz.
File metadata
- Download URL: ado_asana_sync-1.25.0.tar.gz
- Upload date:
- Size: 153.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc0a8662ac206ce60270e8459483a08250f8fcc1a2bab8c57132aca00ab50904
|
|
| MD5 |
0047d2d37196167b077daedd37939ff4
|
|
| BLAKE2b-256 |
b546fc2fe971914f3a88d6c582ff4b24c6bab1670a9fdede180736bfcc6c15ca
|
Provenance
The following attestation bundles were made for ado_asana_sync-1.25.0.tar.gz:
Publisher:
release.yml on danstis/ado-asana-sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ado_asana_sync-1.25.0.tar.gz -
Subject digest:
bc0a8662ac206ce60270e8459483a08250f8fcc1a2bab8c57132aca00ab50904 - Sigstore transparency entry: 965044728
- Sigstore integration time:
-
Permalink:
danstis/ado-asana-sync@85fd567281b48356a6f30e19d7d33d7b8e2c6f13 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/danstis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@85fd567281b48356a6f30e19d7d33d7b8e2c6f13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ado_asana_sync-1.25.0-py3-none-any.whl.
File metadata
- Download URL: ado_asana_sync-1.25.0-py3-none-any.whl
- Upload date:
- Size: 46.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f79a085be9e32a3b17eae18b83fbdcf63c17f7d4432db673affa87c56bce0b1
|
|
| MD5 |
3dfa14beeb734de5f7f28ce7915387bd
|
|
| BLAKE2b-256 |
bd8b97fa8d69682b1f405b51e394bc27c39629dad28d3e0cd3b26c72fb1f33d9
|
Provenance
The following attestation bundles were made for ado_asana_sync-1.25.0-py3-none-any.whl:
Publisher:
release.yml on danstis/ado-asana-sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ado_asana_sync-1.25.0-py3-none-any.whl -
Subject digest:
8f79a085be9e32a3b17eae18b83fbdcf63c17f7d4432db673affa87c56bce0b1 - Sigstore transparency entry: 965044792
- Sigstore integration time:
-
Permalink:
danstis/ado-asana-sync@85fd567281b48356a6f30e19d7d33d7b8e2c6f13 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/danstis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@85fd567281b48356a6f30e19d7d33d7b8e2c6f13 -
Trigger Event:
push
-
Statement type: