microsoft / microsoft/azure-devops-python-api
How can I create a pull request that auto includes associated work item for the commits?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 684
- Forks
- 218
- Avg merge
- 8d 10h
- Merged PRs (30d)
- 1
Description
I'm trying to automate post-release processing. I'm running this code:
pull_request = {
"title": title,
"description": description,
"sourceRefName": "refs/heads/" + source_branch,
"targetRefName": "refs/heads/" + target_branch,
}
response = self._git_client.create_pull_request(pull_request, repository_id=repo_id)
It creates the pull request, but doesn't link any work items (like if I create it in the GUI). When I query the specific commits I can't seem to get the associated work items either, but the GUI is aware of them. Is there an option I need to specify to get this to automatically work, and if not, how can I find the associated work items to build the list myself?
Thanks,
-Derian Reuss
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with GitClient.create_pull_request and the commit-query path described in the issue, then compare them with how the Azure DevOps GUI associates work items. Determine whether the Python API exposes an option or retrieval method; done means documenting the supported approach or clearly identifying the missing API behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- api, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100