scala-steward-org / scala-steward

:robot: A bot that helps you keep your projects up-to-date
Apache License 2.0
1.13k stars 491 forks source link

Wrong targetRefName when create azure-repo PullRequestPayload #3348

Open GreyPlane opened 2 months ago

GreyPlane commented 2 months ago

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?