shayki5 / azure-devops-create-pr-task

Azure Pipelines task to create PR in Azure DevOps or GitHub during a build or release pipeline
https://marketplace.visualstudio.com/items?itemName=ShaykiAbramczyk.CreatePullRequest
MIT License
58 stars 35 forks source link

Problem with Create Pull Request task #3

Closed taniluc closed 5 years ago

taniluc commented 5 years ago

Hi, I'm traying to use this task but a recive this error

[error]Error in the remote server: (404) It was not found.

Do you know why?

shayki5 commented 5 years ago

Hi @taniluc, Which agent do you use? Can you share the full log? Thank you, Shayki

JohannBlais commented 5 years ago

2019-09-11T11:41:01.1514950Z ##[debug]GET http://tfs-server.prd.advz.local/tfs/ADVZ_Collection/_apis/userentitlements?api-version=5.0-preview.2 with 0-byte payload 2019-09-11T11:41:01.1879382Z ##[debug]Leaving RunTask. 2019-09-11T11:41:01.1935496Z ##[debug]Caught exception from task script. 2019-09-11T11:41:01.1974471Z ##[debug]Error record: 2019-09-11T11:41:01.2582695Z ##[debug]Invoke-RestMethod : 2019-09-11T11:41:01.2595951Z ##[debug] 2019-09-11T11:41:01.2609903Z ##[debug] 2019-09-11T11:41:01.2623614Z ##[debug]
2019-09-11T11:41:01.2637285Z ##[debug] Page not found. - Azure DevOps Server 2019-09-11T11:41:01.2651081Z ##[debug]
2019-09-11T11:41:01.2665415Z ##[debug] body,button { font-family: Segoe UI, Helvetica Neue, Helvetica, Arial, Verdana; font-size: 16px; } 2019-09-11T11:41:01.2678774Z ##[debug] body { height: 100% } 2019-09-11T11:41:01.2692485Z ##[debug] A { color: #106ebe; text-decoration: none; } 2019-09-11T11:41:01.2707017Z ##[debug] A:hover { text-decoration: underline; } 2019-09-11T11:41:01.2720637Z ##[debug] h1 { font-size: 32px; color: #666; margin-bottom: 0px; } 2019-09-11T11:41:01.2734692Z ##[debug] h2 { font-size: 24px; color: #666; font-weight: normal; margin-top: 0px; } 2019-09-11T11:41:01.2749290Z ##[debug] pre { font-family: Consolas, Courier New, monospace; font-size: 12px; border: 1px solid #ccc; background-color: #eaeaea; padding: 10px;} 2019-09-11T11:41:01.2762975Z ##[debug] #moreInfoButton { background: transparent; border: 0; color: #106ebe; cursor: pointer; } 2019-09-11T11:41:01.2776569Z ##[debug]
2019-09-11T11:41:01.2791006Z ##[debug]
2019-09-11T11:41:01.2805016Z ##[debug]
2019-09-11T11:41:01.2818843Z ##[debug] function toggle(event) { 2019-09-11T11:41:01.2832237Z ##[debug] if (!event.key || event.key === " " || event.key === "Spacebar" || event.key === "Enter") { 2019-09-11T11:41:01.2846332Z ##[debug] var icon = document.getElementById("moreInfoIcon"); 2019-09-11T11:41:01.2862980Z ##[debug] var section = document.getElementById("moreInfo"); 2019-09-11T11:41:01.2878572Z ##[debug] var wasShowing = section.style.display === "";

JohannBlais commented 5 years ago

Apparently the userid is missing from the call. It does not happen, if you don't specify reviewers

shayki5 commented 5 years ago

Thanks @JohannBlais Can you share a screenshot of the build task? (or the yaml if you use yaml)

taniluc commented 5 years ago

Hi, this is the build task. image image

shayki5 commented 5 years ago

Thanks @taniluc ! In the screenshot you didn't specify reviewers, the issue is still exist or the issue occur only when you add reviewers? If it's only when you add reviewers, can you give me an example what you type in the reviewers field?

taniluc commented 5 years ago

Actually, when I add reviewer: image I recive this error:

[error]Error in the remote server: (404) It was not found.

And when I don't add any reviewer I recive this other error,

[error]Error in the remote server: (403) forbidden.

shayki5 commented 5 years ago

@taniluc Thank you! Do you use Azure DevOps or TFS? Do you enable the "Allow scripts to access the OAuth token" in the agent job options?

taniluc commented 5 years ago

Hello, I use Azure DevOps. And Yes, I enable the "Allow scripts to access the OAuth token" options.

image

CGuandalini commented 5 years ago

Hello, I have the same issue. image

shayki5 commented 5 years ago

@CGuandalini can you share please the task configuration?

shayki5 commented 5 years ago

@taniluc @CGuandalini I added more debug outputs, can you update the extension version and run the build again with system.debug = true? Thank you!

taniluc commented 5 years ago

Hi, This is what I get. image

shayki5 commented 5 years ago

@taniluc Thank you! It looks like a permissions issue, go to the Project Settings -> Repositories, and give Contribute to Pull Request to the user that runs the build (usually is: ProjectName Build Service (username) ).

image

JohannBlais commented 5 years ago

Permissions were set from the start on my side, I still have the 404.

2019-09-25T06:44:54.3710779Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c 2019-09-25T06:44:54.5560056Z ##[debug]Entering RunTask. 2019-09-25T06:44:54.6075087Z ##[debug]INPUT_SOURCEBRANCH: 'refs/heads/develop' 2019-09-25T06:44:54.6117363Z ##[debug]INPUT_TARGETBRANCH: 'master' 2019-09-25T06:44:54.6163981Z ##[debug]INPUT_TITLE: 'Merge for release R7985-B35087' 2019-09-25T06:44:54.6209325Z ##[debug]INPUT_DESCRIPTION (empty) 2019-09-25T06:44:54.6306900Z ##[debug]INPUT_REVIEWERS: 'redacted.user@redacted.com' 2019-09-25T06:44:54.6444259Z not null 2019-09-25T06:44:54.6757973Z ##[debug]GET http://redacted_collection_url_root/_apis/userentitlements?api-version=5.0-preview.2 with 0-byte payload 2019-09-25T06:44:54.7854161Z ##[debug]Leaving RunTask. 2019-09-25T06:44:54.8613119Z ##[debug]Caught exception from task script. 2019-09-25T06:44:54.8663233Z ##[debug]Error record: 2019-09-25T06:44:54.9453244Z ##[debug]Invoke-RestMethod : 2019-09-25T06:44:54.9469924Z ##[debug] 2019-09-25T06:44:54.9493754Z ##[debug] 2019-09-25T06:44:54.9510045Z ##[debug]
2019-09-25T06:44:54.9525530Z ##[debug] Page not found. - Azure DevOps Server 2019-09-25T06:44:54.9549089Z ##[debug]
2019-09-25T06:44:54.9566151Z ##[debug] body,button { font-family: Segoe UI, Helvetica Neue, Helvetica, Arial, Verdana; font-size: 16px; } 2019-09-25T06:44:54.9578350Z ##[debug] body { height: 100% } 2019-09-25T06:44:54.9596862Z ##[debug] A { color: #106ebe; text-decoration: none; } 2019-09-25T06:44:54.9620515Z ##[debug] A:hover { text-decoration: underline; } 2019-09-25T06:44:54.9643208Z ##[debug] h1 { font-size: 32px; color: #666; margin-bottom: 0px; } 2019-09-25T06:44:54.9657374Z ##[debug] h2 { font-size: 24px; color: #666; font-weight: normal; margin-top: 0px; } 2019-09-25T06:44:54.9674792Z ##[debug] pre { font-family: Consolas, Courier New, monospace; font-size: 12px; border: 1px solid #ccc; background-color: #eaeaea; padding: 10px;} 2019-09-25T06:44:54.9694178Z ##[debug] #moreInfoButton { background: transparent; border: 0; color: #106ebe; cursor: pointer; } 2019-09-25T06:44:54.9710827Z ##[debug]
2019-09-25T06:44:54.9728094Z ##[debug]
2019-09-25T06:44:54.9743191Z ##[debug]
2019-09-25T06:44:54.9759050Z ##[debug] function toggle(event) { 2019-09-25T06:44:54.9778846Z ##[debug] if (!event.key || event.key === " " || event.key === "Spacebar" || event.key === "Enter") { 2019-09-25T06:44:54.9798303Z ##[debug] var icon = document.getElementById("moreInfoIcon"); 2019-09-25T06:44:54.9826155Z ##[debug] var section = document.getElementById("moreInfo"); 2019-09-25T06:44:54.9853897Z ##[debug] var wasShowing = section.style.display === ""; 2019-09-25T06:44:54.9874990Z ##[debug] 2019-09-25T06:44:54.9890814Z ##[debug] icon.src = wasShowing 2019-09-25T06:44:54.9915888Z ##[debug] ? "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABGdBTUEAALGPC%2FxhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuODc7gF0AAAB2SURBVDhPY2AYBThDoKWlJa2jo0OO7CBaunTpfxAGGmRCliEgzc%2BePfs%2Ff%2F78%2F01NTZokGwIyAARAhkybNo10Q2AGwAwBeuV%2Fa2urHtEuWb58OWUuABkAC4Pm5mY7om2GKQQZAMJkaQYZAgx5P4rSAclOHjANAOQrXesb81M5AAAAAElFTkSuQmCC" 2019-09-25T06:44:54.9940477Z ##[debug] : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABGdBTUEAALGPC%2FxhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuODc7gF0AAABCSURBVDhPY2AYBfQJATU1NWsgLifLNhUVFVeg5v8gTLIBMM2RkZGkG4CsmWQD0DWTbAAowGD%2BRqLJC0SSA24EagAAq9sjtZrUZogAAAAASUVORK5CYII%3D"; 2019-09-25T06:44:54.9963014Z ##[debug] section.style.display = wasShowing ? "none" : ""; 2019-09-25T06:44:54.9982458Z ##[debug] 2019-09-25T06:44:54.9999860Z ##[debug] event.target.setAttribute("aria-expanded", String(!wasShowing)); 2019-09-25T06:44:55.0018234Z ##[debug] } 2019-09-25T06:44:55.0036068Z ##[debug] } 2019-09-25T06:44:55.0051789Z ##[debug]
2019-09-25T06:44:55.0072984Z ##[debug]
2019-09-25T06:44:55.0100525Z ##[debug] 2019-09-25T06:44:55.0119807Z ##[debug]
2019-09-25T06:44:55.0142100Z ##[debug] 2019-09-25T06:44:55.0161976Z ##[debug]
2019-09-25T06:44:55.0180698Z ##[debug] 2019-09-25T06:44:55.0198068Z ##[debug]
2019-09-25T06:44:55.0214364Z ##[debug] 2019-09-25T06:44:55.0228667Z ##[debug]
2019-09-25T06:44:55.0244115Z ##[debug] Error 2019-09-25T06:44:55.0261986Z ##[debug] The page you are looking for is currently unavailable. 2019-09-25T06:44:55.0276761Z ##[debug]
2019-09-25T06:44:55.0296160Z ##[debug] Page not found. 2019-09-25T06:44:55.0309518Z ##[debug] 2019-09-25T06:44:55.0326358Z ##[debug]
2019-09-25T06:44:55.0358767Z ##[debug]
2019-09-25T06:44:55.0377538Z ##[debug]
2019-09-25T06:44:55.0393222Z ##[debug] More information about this error 2019-09-25T06:44:55.0409109Z ##[debug]
2019-09-25T06:44:55.0428079Z ##[debug]
2019-09-25T06:44:55.0446283Z ##[debug]
2019-09-25T06:44:55.0462298Z ##[debug] Page not found. 2019-09-25T06:44:55.0484216Z ##[debug] 2019-09-25T06:44:55.0500798Z ##[debug] 2019-09-25T06:44:55.0518744Z ##[debug]
2019-09-25T06:44:55.0534897Z ##[debug] 2019-09-25T06:44:55.0550773Z ##[debug] 2019-09-25T06:44:55.0578127Z ##[debug] Things you can try: 2019-09-25T06:44:55.0594881Z ##[debug] 2019-09-25T06:44:55.0611262Z ##[debug]
2019-09-25T06:44:55.0627095Z ##[debug] Refresh the current page 2019-09-25T06:44:55.0645223Z ##[debug] Go back to the previous page 2019-09-25T06:44:55.0663748Z ##[debug]
2019-09-25T06:44:55.0678113Z ##[debug] Sign in as a different user 2019-09-25T06:44:55.0692586Z ##[debug]
2019-09-25T06:44:55.0706158Z ##[debug] Submit feedback to Microsoft about this error 2019-09-25T06:44:55.0721535Z ##[debug]
2019-09-25T06:44:55.0742785Z ##[debug]
2019-09-25T06:44:55.0757729Z ##[debug] 2019-09-25T06:44:55.0777217Z ##[debug]
2019-09-25T06:44:55.0802480Z ##[debug] Azure DevOps Server 2019-09-25T06:44:55.0820104Z ##[debug] c Microsoft Corporation. All rights reserved. 2019-09-25T06:44:55.0839896Z ##[debug]
2019-09-25T06:44:55.0855871Z ##[debug]
2019-09-25T06:44:55.0873505Z ##[debug] 2019-09-25T06:44:55.0888092Z ##[debug]
2019-09-25T06:44:55.0905520Z ##[debug]
2019-09-25T06:44:55.0918223Z ##[debug]
2019-09-25T06:44:55.0940498Z ##[debug]
2019-09-25T06:44:55.0954814Z ##[debug]
2019-09-25T06:44:55.0972800Z ##[debug] 2019-09-25T06:44:55.0994103Z ##[debug] 2019-09-25T06:44:55.1012160Z ##[debug] 2019-09-25T06:44:55.1036905Z ##[debug] 2019-09-25T06:44:55.1061333Z ##[debug]At D:\R1_work_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.0.0\createPullRequest.ps1:83 char:18 2019-09-25T06:44:55.1078093Z ##[debug]+ ... $users = Invoke-RestMethod -Uri $url -Method Get -ContentType appl ... 2019-09-25T06:44:55.1094567Z ##[debug]+ ~~~~~~~~~~~~~ 2019-09-25T06:44:55.1115174Z ##[debug] + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption 2019-09-25T06:44:55.1133459Z ##[debug] + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand 2019-09-25T06:44:55.1166568Z ##[debug]Script stack trace: 2019-09-25T06:44:55.1216418Z ##[debug]at CheckReviewersAndCreatePR, D:\R1_work_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.0.0\createPullRequest.ps1: line 83 2019-09-25T06:44:55.1231850Z ##[debug]at RunTask, D:\R1_work_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.0.0\createPullRequest.ps1: line 29 2019-09-25T06:44:55.1248819Z ##[debug]at , D:\R1_work_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.0.0\createPullRequest.ps1: line 113 2019-09-25T06:44:55.1260728Z ##[debug]at , : line 1 2019-09-25T06:44:55.1275012Z ##[debug]at , : line 22 2019-09-25T06:44:55.1291005Z ##[debug]at , : line 18 2019-09-25T06:44:55.1303378Z ##[debug]at , : line 1 2019-09-25T06:44:55.1331685Z ##[debug]Exception: 2019-09-25T06:44:55.1389668Z ##[debug]System.Net.WebException: The remote server returned an error: (404) Not Found. 2019-09-25T06:44:55.1406602Z ##[debug] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) 2019-09-25T06:44:55.1422835Z ##[debug] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

shayki5 commented 5 years ago

@JohannBlais thank you! Do you use TFS or Azure DevOps? Do you run it in a Release pipeline or in a Build pipeline? In this line: 2019-09-25T06:44:54.6757973Z ##[debug]GET http://redacted_collection_url_root/_apis/userentitlements?api-version=5.0-preview.2 with 0-byte payload What is redacted_collection_url_root? the format should be https://vsaex.dev.azure.com/organization-name/_apis/......

JohannBlais commented 5 years ago

We are using Azure DevOps Server (TFS)

image

I just removed our internal URL, it should read something like http://FQDN/tfs/CollectionName/...

And it runs as the last step of the release pipeline to merge the code to master.

shayki5 commented 5 years ago

@JohannBlais Ok, I checked it and this is the issue, I use a Rest API version 5.0-preview.2 to get the user id (according to the email) and this API version doesn't exist yet in Azure DevOps Server :( Without reviewers can you create the PR?

JohannBlais commented 5 years ago

@shayki5 Yes it works, we are no longer using this feature at the moment. Considering we can still create the PR without the specific reviewers, it is not a big deal for us. We were simply not expecting it to crash :)

shayki5 commented 5 years ago

@JohannBlais Ok great, I'm happy you can use it without it. I will think about a solution for you, how I can get the id without this specific API. Anyway, I hope in the next Azure DevOps Server release the API will be supported. Thank you so much for your response!

taniluc commented 5 years ago

Hi! @shayki5. Actually, I have full access in the project. I'm in the Build Administrators group.

2019-09-25_12h50_54

This is the complete error: ##[debug]POST https://akrosproject.visualstudio.com/BaseDatos/_apis/git/repositories/BaseDatos/pullrequests?api-version=5.0 with -1-byte payload

[debug]Leaving RunTask.

[debug]Caught exception from task script.

[debug]Error record:

[debug]Invoke-RestMethod : {"$id":"1","innerException":null,"message":"TF401027: You need the Git 'PullRequestContribute' permission to perform this action. Details: identity 'Build\d38ffb7c-1841-44db-8ba8-0944772a4d47', scope 'repository'.","typeName":"Microsoft.TeamFoundation.Git.Server.GitNeedsPermissionException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitNeedsPermissionException","errorCode":0,"eventId":3000}

shayki5 commented 5 years ago

Hi @taniluc, the build runs not with your account, he runs with build service account, please check in the bottom of the groups if you have "Build Service (username)" group/user (like in the photo I uploaded) and grant them the permissions. Waiting for your update :)

taniluc commented 5 years ago

@shayki5, I gave the Project Collection Build Service user access to contribute to pull request like you said before, and it works!!!! Thaks a lot for all your help!! :)

shayki5 commented 5 years ago

@taniluc I glad to hear it! You're welcome!

JohannBlais commented 5 years ago

I was about to suggest you document it as a known issue, when I realized you already did. 👍

shayki5 commented 4 years ago

Hi @JohannBlais, I think I fixed the issue, now you can add reviewers also in Azure DevOps Server, can you check it, please? Just update to version 1.2.18. Thank you, Shayki

kapiltwri89 commented 1 year ago

@shayki5 i am still facing this issue. Please help image here is my full log. 2023-08-22T14:47:24.6116980Z ##[section]Starting: Agent job 1 2023-08-22T14:47:24.8020355Z ##[section]Starting: Initialize job 2023-08-22T14:47:24.8024203Z Agent name: 'Hosted Agent' 2023-08-22T14:47:24.8024454Z Agent machine name: 'fv-az395-158' 2023-08-22T14:47:24.8024587Z Current agent version: '3.224.1' 2023-08-22T14:47:24.8060279Z ##[group]Operating System 2023-08-22T14:47:24.8060424Z Microsoft Windows Server 2022 2023-08-22T14:47:24.8060708Z 10.0.20348 2023-08-22T14:47:24.8060780Z Datacenter 2023-08-22T14:47:24.8060857Z ##[endgroup] 2023-08-22T14:47:24.8060935Z ##[group]Runner Image 2023-08-22T14:47:24.8061289Z Image: windows-2022 2023-08-22T14:47:24.8061380Z Version: 20230804.1.0 2023-08-22T14:47:24.8061553Z Included Software: https://github.com/actions/runner-images/blob/win22/20230804.1/images/win/Windows2022-Readme.md 2023-08-22T14:47:24.8061861Z Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20230804.1 2023-08-22T14:47:24.8062003Z ##[endgroup] 2023-08-22T14:47:24.8062093Z ##[group]Runner Image Provisioner 2023-08-22T14:47:24.8062550Z 2.0.266.1 2023-08-22T14:47:24.8062620Z ##[endgroup] 2023-08-22T14:47:24.8064198Z Current image version: '20230804.1.0' 2023-08-22T14:47:24.8072669Z Agent running as: 'VssAdministrator' 2023-08-22T14:47:24.8118351Z Prepare build directory. 2023-08-22T14:47:24.8450149Z Set build variables. 2023-08-22T14:47:24.8486814Z Download all required tasks. 2023-08-22T14:47:24.8686987Z Downloading task: CreatePullRequest (1.2.360) 2023-08-22T14:47:25.0193837Z Checking job knob settings. 2023-08-22T14:47:25.0207007Z Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 2023-08-22T14:47:25.0207786Z Knob: AgentToolsDirectory = C:\hostedtoolcache\windows Source: ${AGENT_TOOLSDIRECTORY} 2023-08-22T14:47:25.0208686Z Knob: AgentPerflog = c:\vsts\perflog Source: ${VSTS_AGENT_PERFLOG} 2023-08-22T14:47:25.0210032Z Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 2023-08-22T14:47:25.0211197Z Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 2023-08-22T14:47:25.0211851Z Finished checking job knob settings. 2023-08-22T14:47:25.0560192Z Start tracking orphan processes. 2023-08-22T14:47:25.0639810Z ##[section]Finishing: Initialize job 2023-08-22T14:47:25.0891761Z ##[section]Async Command Start: DetectDockerContainer 2023-08-22T14:47:25.0891993Z ##[section]Async Command End: DetectDockerContainer 2023-08-22T14:47:25.0892834Z ##[section]Async Command Start: DetectDockerContainer 2023-08-22T14:47:25.0893035Z ##[section]Async Command End: DetectDockerContainer 2023-08-22T14:47:25.1161630Z ##[section]Starting: Checkout Test@refs/pull/3/merge to s 2023-08-22T14:47:25.2125308Z ============================================================================== 2023-08-22T14:47:25.2126601Z Task : Get sources 2023-08-22T14:47:25.2127122Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 2023-08-22T14:47:25.2127312Z Version : 1.0.0 2023-08-22T14:47:25.2127642Z Author : Microsoft 2023-08-22T14:47:25.2128135Z Help : More Information 2023-08-22T14:47:25.2128278Z ============================================================================== 2023-08-22T14:47:26.2689729Z Syncing repository: Test (Git) 2023-08-22T14:47:26.4347816Z Prepending Path environment variable with directory containing 'git.exe'. 2023-08-22T14:47:26.4366582Z ##[command]git version 2023-08-22T14:47:26.6670052Z git version 2.39.1.windows.1 2023-08-22T14:47:26.6672917Z ##[command]git lfs version 2023-08-22T14:47:27.5224054Z git-lfs/3.3.0 (GitHub; windows amd64; go 1.19.3; git 77deabdf) 2023-08-22T14:47:27.5487344Z ##[command]git init "D:\a\1\s" 2023-08-22T14:47:27.7037397Z Initialized empty Git repository in D:/a/1/s/.git/ 2023-08-22T14:47:27.7095361Z ##[command]git remote add origin https://kapil30tiwari@dev.azure.com/kapil30tiwari/Test/_git/Test 2023-08-22T14:47:27.8028891Z ##[command]git config gc.auto 0 2023-08-22T14:47:27.8780662Z ##[command]git config --get-all http.https://kapil30tiwari@dev.azure.com/kapil30tiwari/Test/_git/Test.extraheader 2023-08-22T14:47:27.9486303Z ##[command]git config --get-all http.extraheader 2023-08-22T14:47:28.0153663Z ##[command]git config --get-regexp .extraheader 2023-08-22T14:47:28.0833470Z ##[command]git config --get-all http.proxy 2023-08-22T14:47:28.1818061Z ##[command]git config http.version HTTP/1.1 2023-08-22T14:47:28.2637236Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +ca50c8af152c922a6e9fa5c58c9ab9c345c76160:refs/remotes/origin/ca50c8af152c922a6e9fa5c58c9ab9c345c76160 2023-08-22T14:47:29.3436903Z remote: Azure Repos
2023-08-22T14:47:29.3439124Z remote: 2023-08-22T14:47:29.3440082Z remote: Found 11 objects to send. (0 ms)
2023-08-22T14:47:29.6852510Z From https://dev.azure.com/kapil30tiwari/Test/_git/Test 2023-08-22T14:47:29.6853972Z
[new ref] ca50c8af152c922a6e9fa5c58c9ab9c345c76160 -> origin/ca50c8af152c922a6e9fa5c58c9ab9c345c76160 2023-08-22T14:47:29.7383517Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +ca50c8af152c922a6e9fa5c58c9ab9c345c76160 2023-08-22T14:47:29.9386334Z remote: Azure Repos
2023-08-22T14:47:29.9387719Z remote: 2023-08-22T14:47:29.9388851Z remote: Found 0 objects to send. (0 ms)
2023-08-22T14:47:30.0061268Z From https://dev.azure.com/kapil30tiwari/Test/_git/Test 2023-08-22T14:47:30.0062620Z * branch ca50c8af152c922a6e9fa5c58c9ab9c345c76160 -> FETCH_HEAD 2023-08-22T14:47:30.0839858Z ##[command]git checkout --progress --force refs/remotes/origin/ca50c8af152c922a6e9fa5c58c9ab9c345c76160 2023-08-22T14:47:30.1657244Z Note: switching to 'refs/remotes/origin/ca50c8af152c922a6e9fa5c58c9ab9c345c76160'. 2023-08-22T14:47:30.1658675Z 2023-08-22T14:47:30.1660483Z You are in 'detached HEAD' state. You can look around, make experimental 2023-08-22T14:47:30.1661734Z changes and commit them, and you can discard any commits you make in this 2023-08-22T14:47:30.1662613Z state without impacting any branches by switching back to a branch. 2023-08-22T14:47:30.1663590Z 2023-08-22T14:47:30.1664439Z If you want to create a new branch to retain commits you create, you may 2023-08-22T14:47:30.1665433Z do so (now or later) by using -c with the switch command. Example: 2023-08-22T14:47:30.1666509Z 2023-08-22T14:47:30.1668708Z git switch -c 2023-08-22T14:47:30.1670062Z 2023-08-22T14:47:30.1670829Z Or undo this operation with: 2023-08-22T14:47:30.1671566Z 2023-08-22T14:47:30.1672240Z git switch - 2023-08-22T14:47:30.1673077Z 2023-08-22T14:47:30.1673834Z Turn off this advice by setting config variable advice.detachedHead to false 2023-08-22T14:47:30.1674756Z 2023-08-22T14:47:30.1675552Z HEAD is now at ca50c8a Merge pull request 3 from main3 into main 2023-08-22T14:47:30.1719279Z ##[command]git config http.https://kapil30tiwari@dev.azure.com/kapil30tiwari/Test/_git/Test.extraheader "AUTHORIZATION: placeholder_d2695ee7-ffa5-474a-9cf8-dac2fc551378" 2023-08-22T14:47:30.2685191Z ##[section]Finishing: Checkout Test@refs/pull/3/merge to s 2023-08-22T14:47:30.2719461Z ##[section]Starting: Create Pull Request 2023-08-22T14:47:30.2904261Z ============================================================================== 2023-08-22T14:47:30.2904396Z Task : Create Pull Request 2023-08-22T14:47:30.2904485Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch. 2023-08-22T14:47:30.2904646Z Version : 1.2.360 2023-08-22T14:47:30.2904702Z Author : Shayki Abramczyk 2023-08-22T14:47:30.2904767Z Help : More Information 2023-08-22T14:47:30.2905866Z ============================================================================== 2023-08-22T14:47:31.7492749Z The repository is: Test 2023-08-22T14:47:31.7501752Z The Source Branch is: refs/pull/3/merge 2023-08-22T14:47:31.7511123Z The Target Branch is: refs/heads/develop 2023-08-22T14:47:31.7523563Z The Title is: refs/pull/3/mergeTodevelop 2023-08-22T14:47:31.7540851Z The Description is: refs/pull/3/mergeTodevelop 2023-08-22T14:47:31.7555872Z Is Reviewers are: kapil30.tiwari@gmail.com 2023-08-22T14:47:31.7567862Z The tags are: Testing 2023-08-22T14:47:31.7630035Z Is Draft Pull Request: False 2023-08-22T14:47:31.7641809Z Auto-Complete: False 2023-08-22T14:47:31.7652151Z Link Work Items: False 2023-08-22T14:47:31.7663577Z Bypass: False 2023-08-22T14:47:31.7674529Z Bypass Reason: 2023-08-22T14:47:31.7685765Z DeleteSourceBranch ist set to: False 2023-08-22T14:47:32.1900674Z ##[error]The remote server returned an error: (404) Not Found. 2023-08-22T14:47:32.2188888Z ##[section]Finishing: Create Pull Request 2023-08-22T14:47:32.2217177Z ##[section]Starting: Checkout Test@refs/pull/3/merge to s 2023-08-22T14:47:32.2366205Z ============================================================================== 2023-08-22T14:47:32.2366342Z Task : Get sources 2023-08-22T14:47:32.2366402Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories. 2023-08-22T14:47:32.2366524Z Version : 1.0.0 2023-08-22T14:47:32.2366577Z Author : Microsoft 2023-08-22T14:47:32.2366633Z Help : More Information 2023-08-22T14:47:32.2366724Z ============================================================================== 2023-08-22T14:47:33.2504844Z Cleaning any cached credential from repository: Test (Git) 2023-08-22T14:47:33.2574392Z Prepending Path environment variable with directory containing 'git.exe'. 2023-08-22T14:47:33.2684048Z ##[command]git version 2023-08-22T14:47:33.2764003Z git version 2.39.1.windows.1 2023-08-22T14:47:33.2764821Z ##[command]git lfs version 2023-08-22T14:47:33.3767159Z git-lfs/3.3.0 (GitHub; windows amd64; go 1.19.3; git 77deabdf) 2023-08-22T14:47:33.3805585Z ##[command]git config --unset-all http.https://kapil30tiwari@dev.azure.com/kapil30tiwari/Test/_git/Test.extraheader 2023-08-22T14:47:33.4537790Z ##[section]Finishing: Checkout Test@refs/pull/3/merge to s 2023-08-22T14:47:33.4692935Z ##[section]Starting: Finalize Job 2023-08-22T14:47:33.4733246Z Cleaning up task key 2023-08-22T14:47:33.4734712Z Start cleaning up orphan processes. 2023-08-22T14:47:33.4755087Z ##[section]Finishing: Finalize Job 2023-08-22T14:47:33.4840953Z ##[section]Finishing: Agent job 1

shayki5 commented 1 year ago

Hi @kapiltwri89, without reviewers is it working? Can you enable diagnostic logs and share it here?

kapiltwri89 commented 1 year ago

Hi,

nop, i have tried with/without reviewer both but not working. please help

On Tue, Aug 22, 2023 at 8:28 PM Shayki Abramczyk @.***> wrote:

Hi @kapiltwri89 https://github.com/kapiltwri89, without reviewers is it working? Can you enable diagnostic logs and share it here?

— Reply to this email directly, view it on GitHub https://github.com/shayki5/azure-devops-create-pr-task/issues/3#issuecomment-1688356530, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASMRAR55T355GZCITQDCRBDXWTCHNANCNFSM4IUBXHUQ . You are receiving this because you were mentioned.Message ID: @.***>

--

Kapil Tiwari

kapiltwri89 commented 1 year ago

logs_17.zip nop, i have tried with/without reviewer both but not working. please help

shayki5 commented 1 year ago

@kapiltwri89 I can see your source branch is refs/pull/3/merge which is PR branch. You can't open a new Pull Request from PR branch to another branch. You need to provide a regular branch.