The return from az repos pr create does not show the commits or number of commits in source branch not in targetbranch
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
in the return from
$return = az repos pr create `
--project $project `
--repository $repository `
--source-branch $sourcebranch `
--target-branch $targetbranch ` |
ConvertFrom-Json;
the return does not have commits populated and shows 0 or null.
artifactId : vstfs:///Git/PullRequestId/a66dd09e-1cf1-4979-af37-7a9440d4f98d%2f06ec5fd1-a2bf-44c3-9c71-0a8edbf2e922%2f15700
autoCompleteSetBy :
closedBy :
closedDate :
codeReviewId : 15700
commits :
completionOptions :
completionQueueTime :
createdBy :
creationDate : 2023-10-03T15:52:18.402373+00:00
description :
forkSource :
isDraft : False
labels :
lastMergeCommit :
lastMergeSourceCommit : @{author=; changeCounts=; changes=; comment=; commentTruncated=;
commitId=e45c7f46b4dfa50b15a4815cc04a7abe621a2839; committer=; parents=; push=; remoteUrl=; statuses=; url=https://
dev.azure.com/sdfsdfsdf/a66dd09e-1cf1-4979-af37-7a9440d4f98d/_apis/git/repositories/06ec5fd1-a2bf-44c3-9c71-0a8e
dbf2e922/commits/e45c7f46b4dfa50b15a4815cc04a7abe621a2839; workItems=}
lastMergeTargetCommit : @{author=; changeCounts=; changes=; comment=; commentTruncated=;
commitId=111e3f98890ccaf65185f6d1774bfd0df6614ae8; committer=; parents=; push=; remoteUrl=; statuses=; url=https://
dev.azure.com/sdfsdfsdfs/a66dd09e-1cf1-4979-af37-7a9440d4f98d/_apis/git/repositories/06ec5fd1-a2bf-44c3-9c71-0a8e
dbf2e922/commits/111e3f98890ccaf65185f6d1774bfd0df6614ae8; workItems=}
mergeFailureMessage :
mergeFailureType :
mergeId : 08d33003-6d98-4088-8939-6e1b02d6443a
mergeOptions :
mergeStatus : queued
pullRequestId : 15700
remoteUrl :
repository :
reviewers :
sourceRefName : refs/heads/PDM-513
status : active
supportsIterations : True
targetRefName : refs/heads/development
title : update and add dummy change for testing prs
url : https://dev.azure.com/sdfsdfdsfsf/a66dd09e-1cf1-4979-af37-7a9440d4f98d/_apis/git/repositories/06ec5fd1-a2bf-44c3-9
c71-0a8edbf2e922/pullRequests/15700
workItemRefs :
### Related command
NA
### Errors
NA
### Issue script & Debug output
NA
### Expected behavior
I would expect the return of new PR creation to have some details on number of commits relative to the target branch.
### Environment Summary
azure-cli 2.52.0 *
core 2.52.0 *
telemetry 1.1.0
Extensions:
azure-devops 0.26.0
Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\Lance_Lyons\.azure\cliextensions'
Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
### Additional context
We are trying to make sure a completed PR from $sourcebranch to $targetbranch doesnt have additional commits not merged before deleting the PR branch.
sometimes a PR branch is used for several commits into the target branch.
Contributor guide
Assessment
This issue has not been assessed yet.