Skip to content
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

Wrong targetRefName when create azure-repo PullRequestPayload #3348

Closed
GreyPlane opened this issue May 7, 2024 · 0 comments · Fixed by #3349
Closed

Wrong targetRefName when create azure-repo PullRequestPayload #3348

GreyPlane opened this issue May 7, 2024 · 0 comments · Fixed by #3349

Comments

@GreyPlane
Copy link
Contributor

GreyPlane commented May 7, 2024

configured repo was like $owner/$repo:develop, other functionality was running fine, but when Steward trying to create a PR, it gets

{
        "$id": "1",
        "errorCode": 0,
        "eventId": 3000,
        "innerException": null,
        "message": "TF401398: The pull request cannot be activated because the source and/or the target branch no longer exists, or the requested refs are not branches",
        "typeKey": "GitPullRequestCannotBeActivated",
        "typeName": "Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server"
}

after investigation, it seems the targetRefName was develop instead of refs/head/develop, also it appears in both tests and Azure repo API docs, it should be refs/head/develop.

Is this due to something changed in NewPullRequestData.base.name, or AzureRepos changed their API?

@fthomas fthomas linked a pull request Jan 20, 2025 that will close this issue
@fthomas fthomas closed this as completed Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants