-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az repos pr create --delete-source-branch #27498
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botDevOpsService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-platform-engineering-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botDevOpsService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-platform-engineering-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Describe the bug
In a CI/CD workflow in Azure Releases, I automatically create a PR after a stage.
When this PR is approved and completed, I want it to be automatically be deleted, and set the flag
--delete-source-branch true.Documentation explains:
Delete the source branch after the pull request has been completed and merged into the target branch.The PR get created successfully, but the branch is not deleted when I complete the PR.
Note that this PR is created as the user Project Collection Build Service ({OrgName}), using the:
environment token in Azure Releases:
AZURE_DEVOPS_EXT_PATand$(System.AccessToken)Related command
Errors
no errors
Issue script & Debug output
cli.knack.cli: Command arguments: ['repos', 'pr', 'create', '--project', 'Project', '--organization', 'https://dev.azure.com/Organization/', '--repository', 'ProjectBackend', '--delete-source-branch', 'true', '--source-branch', 'testing_pr_loc', '--target-branch', 'testing_pr', '--title', 'TESTING', '--reviewers', 'foo@bar.com', '--description', '- Deployed Synapse to prod 2023-09-29', 'testing', '--debug']
Expected behavior
I expect that the branch will be deleted after the PR has been completed, as documentation says.
Environment Summary
bash script, running in a
Bash@3 - Bash v3 taskAdditional context
No response