Giter VIP home page Giter VIP logo

azure-devops-create-pr-task's Introduction

👋 Hi there, I'm Shayki Abramczyk. DevOps Engineer.

Keybase LinkedIn Keybase Twitter

Anurag's GitHub stats

Technologies that I'm passionate about:

Auzre DevOps, Git, CI/CD, Docker, Kubernetes, AWS, Terraform, PowerShell, Python.

azure-devops-create-pr-task's People

Contributors

asears avatar berreek avatar cbsreshimvse avatar daxaar avatar deadlydog avatar inikulshin avatar ligz08 avatar miigg avatar orty avatar piotrgredowski avatar schamal2205 avatar sgabler avatar shayki5 avatar zizizach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

azure-devops-create-pr-task's Issues

After update to version 1.2.55 - [error]Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Message'. Specified method is not supported.

2019-12-31T02:50:33.0379760Z ##[debug]Evaluating condition for step: 'DEV build succeeded - automatic pull request'
2019-12-31T02:50:33.0380521Z ##[debug]Evaluating: succeeded()
2019-12-31T02:50:33.0380611Z ##[debug]Evaluating succeeded:
2019-12-31T02:50:33.0380925Z ##[debug]=> True
2019-12-31T02:50:33.0381125Z ##[debug]Result: True
2019-12-31T02:50:33.0381338Z ##[section]Starting: DEV build succeeded - automatic pull request
2019-12-31T02:50:33.0488819Z ==============================================================================
2019-12-31T02:50:33.0488895Z Task : Create Pull Request
2019-12-31T02:50:33.0488926Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2019-12-31T02:50:33.0488955Z Version : 1.2.55
2019-12-31T02:50:33.0488995Z Author : Shayki Abramczyk
2019-12-31T02:50:33.0489024Z Help : More Information
2019-12-31T02:50:33.0489071Z ==============================================================================
2019-12-31T02:50:33.9123486Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c
2019-12-31T02:50:34.1093857Z ##[debug]Entering RunTask.
2019-12-31T02:50:34.1496555Z ##[debug]INPUT_SOURCEBRANCH: 'Development'
2019-12-31T02:50:34.1529875Z ##[debug]INPUT_TARGETBRANCH: 'master'
2019-12-31T02:50:34.1628035Z ##[debug]INPUT_TITLE: 'DEV build succeeded - automatic pull request'
2019-12-31T02:50:34.1629738Z ##[debug]INPUT_DESCRIPTION (empty)
2019-12-31T02:50:34.1655240Z ##[debug]INPUT_REVIEWERS (empty)
2019-12-31T02:50:34.1687137Z ##[debug]INPUT_REPOTYPE: 'Azure DevOps'
2019-12-31T02:50:34.1754139Z ##[debug]INPUT_ISDRAFT: 'false'
2019-12-31T02:50:34.1754755Z ##[debug] Converted to bool: False
2019-12-31T02:50:34.1782183Z ##[debug]INPUT_AUTOCOMPLETE: 'false'
2019-12-31T02:50:34.1801662Z ##[debug] Converted to bool: False
2019-12-31T02:50:34.1831468Z ##[debug]INPUT_MERGESTRATEGY: 'Merge (No fast-forward)'
2019-12-31T02:50:34.1860061Z ##[debug]INPUT_DELETESOURCH: 'false'
2019-12-31T02:50:34.1880364Z ##[debug] Converted to bool: False
2019-12-31T02:50:34.1908354Z ##[debug]INPUT_COMMITMESSAGE (empty)
2019-12-31T02:50:34.1938770Z ##[debug]INPUT_TRANSITIONWORKITEMS: 'false'
2019-12-31T02:50:34.1961327Z ##[debug] Converted to bool: False
2019-12-31T02:50:34.1993298Z ##[debug]INPUT_LINKWORKITEMS: 'true'
2019-12-31T02:50:34.2014556Z ##[debug] Converted to bool: True
2019-12-31T02:50:34.2341812Z The Source Branch is: refs/heads/Development
2019-12-31T02:50:34.2349449Z The Target Branch is: refs/heads/master
2019-12-31T02:50:34.2357004Z The Title is: DEV build succeeded - automatic pull request
2019-12-31T02:50:34.2364748Z The Description is:
2019-12-31T02:50:34.2405439Z Is Draft Pull Request: False
2019-12-31T02:50:34.4535010Z ##[debug]{
2019-12-31T02:50:34.4550013Z ##[debug] "compareVersion": {
2019-12-31T02:50:34.4565593Z ##[debug] "versionOptions": 0,
2019-12-31T02:50:34.4582921Z ##[debug] "versionType": 0,
2019-12-31T02:50:34.4598072Z ##[debug] "version": "Development"
2019-12-31T02:50:34.4614061Z ##[debug] },
2019-12-31T02:50:34.4630486Z ##[debug] "itemVersion": {
2019-12-31T02:50:34.4647086Z ##[debug] "versionOptions": 0,
2019-12-31T02:50:34.4662855Z ##[debug] "versionType": 0,
2019-12-31T02:50:34.4677964Z ##[debug] "version": "master"
2019-12-31T02:50:34.4692253Z ##[debug] },
2019-12-31T02:50:34.4707035Z ##[debug] "$top": 101,
2019-12-31T02:50:34.5206864Z ##[debug] "includeWorkItems": "true"
2019-12-31T02:50:34.5336007Z ##[debug]}
2019-12-31T02:50:34.5441473Z ##[debug]POST https://dev.azure.com/jonasmock/MQTT_WiFi_Relais/_apis/git/repositories/MQTT_WiFi_Relais/commitsBatch?api-version=4.1 with -1-byte payload
2019-12-31T02:50:34.6193027Z ##[debug]received 1440-byte response of content type application/json; charset=utf-8; api-version=4.1
2019-12-31T02:50:34.6243821Z ##[debug]@{count=2; value=System.Object[]}
2019-12-31T02:50:34.7688715Z ##[debug]Leaving RunTask.
2019-12-31T02:50:34.8362491Z ##[debug]Caught exception from task script.
2019-12-31T02:50:34.8399468Z ##[debug]Error record:
2019-12-31T02:50:34.9180898Z ##[debug]GetLinkedWorkItems : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Message'. Specified method is not supported.
2019-12-31T02:50:34.9194893Z ##[debug]At D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.55\createPullRequest.ps1:241 char:22
2019-12-31T02:50:34.9209329Z ##[debug]+ ... workItems = GetLinkedWorkItems -sourceBranch $sourceBranch.Remove(0, ...
2019-12-31T02:50:34.9224108Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-12-31T02:50:34.9237685Z ##[debug] + CategoryInfo : InvalidArgument: (:) [GetLinkedWorkItems], ParameterBindingException
2019-12-31T02:50:34.9250428Z ##[debug] + FullyQualifiedErrorId : CannotConvertArgument,GetLinkedWorkItems
2019-12-31T02:50:34.9264296Z ##[debug]
2019-12-31T02:50:34.9340870Z ##[debug]Script stack trace:
2019-12-31T02:50:34.9341771Z ##[debug]at GetLinkedWorkItems, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.55\createPullRequest.ps1: line 343
2019-12-31T02:50:34.9342088Z ##[debug]at CreateAzureDevOpsPullRequest, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.55\createPullRequest.ps1: line 241
2019-12-31T02:50:34.9356463Z ##[debug]at CreatePullRequest, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.55\createPullRequest.ps1: line 80
2019-12-31T02:50:34.9370687Z ##[debug]at RunTask, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.55\createPullRequest.ps1: line 38
2019-12-31T02:50:34.9386813Z ##[debug]at , D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.55\createPullRequest.ps1: line 429
2019-12-31T02:50:34.9402321Z ##[debug]at , : line 1
2019-12-31T02:50:34.9416747Z ##[debug]at , : line 22
2019-12-31T02:50:34.9431911Z ##[debug]at , : line 18
2019-12-31T02:50:34.9446155Z ##[debug]at , : line 1
2019-12-31T02:50:34.9468135Z ##[debug]Exception:
2019-12-31T02:50:35.0081955Z ##[debug]System.Management.Automation.ParameterBindingException: Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Message'. Specified method is not supported. ---> System.NotSupportedException: Specified method is not supported.
2019-12-31T02:50:35.0110222Z ##[debug] at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)
2019-12-31T02:50:35.0113790Z ##[debug] --- End of inner exception stack trace ---
2019-12-31T02:50:35.0114020Z ##[debug] at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2019-12-31T02:50:35.0115076Z ##[debug] at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) 2019-12-31T02:50:35.0115487Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2019-12-31T02:50:35.0115758Z ##[debug] at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2019-12-31T02:50:35.0116007Z ##[debug] at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) 2019-12-31T02:50:35.0116246Z ##[debug] at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) 2019-12-31T02:50:35.0116480Z ##[debug] at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object dollarUnderbar, Object inputToProcess)
2019-12-31T02:50:35.0117797Z ##[debug] at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
2019-12-31T02:50:35.0118085Z ##[debug] at System.Management.Automation.CommandProcessorBase.Complete()
2019-12-31T02:50:35.0171047Z ##[error]Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Message'. Specified method is not supported.
2019-12-31T02:50:35.0180295Z ##[debug]Processed: ##vso[task.logissue type=error]Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Message'. Specified method is not supported.
2019-12-31T02:50:35.0192304Z ##[debug]Processed: ##vso[task.complete result=Failed]
2019-12-31T02:50:35.0683920Z ##[section]Finishing: DEV build succeeded - automatic pull request

Can't set Auto Complete to PR

Hi all,

despite the stuff I read in the closed issues, I still have problems with the auto-completion.

Debug Log:

2020-02-07T22:32:51.6186884Z ##[debug]Evaluating condition for step: 'Trigger pull request'
2020-02-07T22:32:51.6196343Z ##[debug]Evaluating: and(succeeded(), eq(variables['Build.SourceBranchName'], 'develop'))
2020-02-07T22:32:51.6196523Z ##[debug]Evaluating and:
2020-02-07T22:32:51.6202858Z ##[debug]..Evaluating succeeded:
2020-02-07T22:32:51.6203457Z ##[debug]..=> True
2020-02-07T22:32:51.6203631Z ##[debug]..Evaluating eq:
2020-02-07T22:32:51.6207830Z ##[debug]....Evaluating indexer:
2020-02-07T22:32:51.6251550Z ##[debug]......Evaluating variables:
2020-02-07T22:32:51.6255453Z ##[debug]......=> Object
2020-02-07T22:32:51.6255926Z ##[debug]......Evaluating String:
2020-02-07T22:32:51.6256454Z ##[debug]......=> 'Build.SourceBranchName'
2020-02-07T22:32:51.6274949Z ##[debug]....=> 'develop'
2020-02-07T22:32:51.6275434Z ##[debug]....Evaluating String:
2020-02-07T22:32:51.6275514Z ##[debug]....=> 'develop'
2020-02-07T22:32:51.6285056Z ##[debug]..=> True
2020-02-07T22:32:51.6285568Z ##[debug]=> True
2020-02-07T22:32:51.6289132Z ##[debug]Expanded: and(True, eq('develop', 'develop'))
2020-02-07T22:32:51.6289293Z ##[debug]Result: True
2020-02-07T22:32:51.6289536Z ##[section]Starting: Trigger pull request
2020-02-07T22:32:51.6385463Z ==============================================================================
2020-02-07T22:32:51.6385540Z Task         : Create Pull Request
2020-02-07T22:32:51.6385582Z Description  : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-02-07T22:32:51.6385634Z Version      : 1.2.63
2020-02-07T22:32:51.6385683Z Author       : Shayki Abramczyk
2020-02-07T22:32:51.6385717Z Help         : [More Information](https://github.com/shayki5/azure-devops-create-pr-task/blob/master/README.md)
2020-02-07T22:32:51.6385751Z ==============================================================================
2020-02-07T22:32:52.6319135Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c
2020-02-07T22:32:52.8344752Z ##[debug]Entering RunTask.
2020-02-07T22:32:52.8655769Z ##[debug]INPUT_SOURCEBRANCH: 'develop'
2020-02-07T22:32:52.8684717Z ##[debug]INPUT_TARGETBRANCH: 'master'
2020-02-07T22:32:52.8778952Z ##[debug]INPUT_TITLE: 'dev -> master'
2020-02-07T22:32:52.8780469Z ##[debug]INPUT_DESCRIPTION (empty)
2020-02-07T22:32:52.8793681Z ##[debug]INPUT_REVIEWERS (empty)
2020-02-07T22:32:52.8821157Z ##[debug]INPUT_REPOTYPE: 'Azure DevOps'
2020-02-07T22:32:52.8884278Z ##[debug]INPUT_ISDRAFT: 'false'
2020-02-07T22:32:52.8885978Z ##[debug] Converted to bool: False
2020-02-07T22:32:52.8900944Z ##[debug]INPUT_AUTOCOMPLETE: 'true'
2020-02-07T22:32:52.8919764Z ##[debug] Converted to bool: True
2020-02-07T22:32:52.8945403Z ##[debug]INPUT_MERGESTRATEGY: 'rebase'
2020-02-07T22:32:52.8971536Z ##[debug]INPUT_DELETESOURCH: 'false'
2020-02-07T22:32:52.8990705Z ##[debug] Converted to bool: False
2020-02-07T22:32:52.9016871Z ##[debug]INPUT_COMMITMESSAGE (empty)
2020-02-07T22:32:52.9043902Z ##[debug]INPUT_TRANSITIONWORKITEMS: 'false'
2020-02-07T22:32:52.9062158Z ##[debug] Converted to bool: False
2020-02-07T22:32:52.9088471Z ##[debug]INPUT_LINKWORKITEMS: 'true'
2020-02-07T22:32:52.9107157Z ##[debug] Converted to bool: True
2020-02-07T22:32:52.9445731Z The Source Branch is: refs/heads/develop
2020-02-07T22:32:52.9453130Z The Target Branch is: refs/heads/master
2020-02-07T22:32:52.9460100Z The Title is: dev -> master
2020-02-07T22:32:52.9466854Z The Description is: 
2020-02-07T22:32:52.9511532Z Is Draft Pull Request: False
2020-02-07T22:32:53.0957521Z ##[debug]{
2020-02-07T22:32:53.0970857Z ##[debug]    "compareVersion":  {
2020-02-07T22:32:53.0992922Z ##[debug]                           "versionOptions":  0,
2020-02-07T22:32:53.1006941Z ##[debug]                           "versionType":  0,
2020-02-07T22:32:53.1020005Z ##[debug]                           "version":  "develop"
2020-02-07T22:32:53.1034258Z ##[debug]                       },
2020-02-07T22:32:53.1046456Z ##[debug]    "itemVersion":  {
2020-02-07T22:32:53.1058978Z ##[debug]                        "versionOptions":  0,
2020-02-07T22:32:53.1072675Z ##[debug]                        "versionType":  0,
2020-02-07T22:32:53.1085962Z ##[debug]                        "version":  "master"
2020-02-07T22:32:53.1098559Z ##[debug]                    },
2020-02-07T22:32:53.1111109Z ##[debug]    "$top":  101,
2020-02-07T22:32:53.2155011Z ##[debug]    "includeWorkItems":  "true"
2020-02-07T22:32:53.2291301Z ##[debug]}
2020-02-07T22:32:53.2492516Z ##[debug]POST https://dev.azure.com/loaderb0t/awdware/_apis/git/repositories/awdware/commitsBatch?api-version=4.1 with -1-byte payload
2020-02-07T22:32:53.3046759Z ##[debug]received 2571-byte response of content type application/json; charset=utf-8; api-version=4.1
2020-02-07T22:32:53.3092300Z ##[debug]@{count=4; value=System.Object[]}
2020-02-07T22:32:53.3260920Z ##[debug]{
2020-02-07T22:32:53.3273180Z ##[debug]    "sourceRefName":  "refs/heads/develop",
2020-02-07T22:32:53.3284741Z ##[debug]    "title":  "dev -\u003e master",
2020-02-07T22:32:53.3296515Z ##[debug]    "WorkItemRefs":  [
2020-02-07T22:32:53.3308260Z ##[debug]                         null
2020-02-07T22:32:53.3319854Z ##[debug]                     ],
2020-02-07T22:32:53.3331578Z ##[debug]    "description":  "",
2020-02-07T22:32:53.3342773Z ##[debug]    "reviewers":  "",
2020-02-07T22:32:53.3355784Z ##[debug]    "isDraft":  "False",
2020-02-07T22:32:53.3367200Z ##[debug]    "targetRefName":  "refs/heads/master"
2020-02-07T22:32:53.3378704Z ##[debug]}
2020-02-07T22:32:53.3400256Z ##[debug]https://dev.azure.com/loaderb0t/awdware/_apis/git/repositories/awdware/pullrequests?api-version=5.0
2020-02-07T22:32:53.3422148Z ##[debug]POST https://dev.azure.com/loaderb0t/awdware/_apis/git/repositories/awdware/pullrequests?api-version=5.0 with -1-byte payload
2020-02-07T22:32:53.5483279Z ##[debug]received 5125-byte response of content type application/json; charset=utf-8; api-version=5.0
2020-02-07T22:32:53.5548953Z *************************
2020-02-07T22:32:53.5551814Z ******** Success ********
2020-02-07T22:32:53.5553553Z *************************
2020-02-07T22:32:53.5563231Z Pull Request 10 created.
2020-02-07T22:32:53.5725431Z ##[debug]GET https://vssps.dev.azure.com/loaderb0t/_apis/graph/users?api-version=4.1-preview.1 with 0-byte payload
2020-02-07T22:32:53.8903560Z ##[debug]received 33336-byte response of content type application/json; charset=utf-8; api-version=4.1-preview.1
2020-02-07T22:32:55.0986561Z ##[debug]{
2020-02-07T22:32:55.0997725Z ##[debug]    "completionOptions":  {
2020-02-07T22:32:55.1011032Z ##[debug]                              "mergeStrategy":  "rebase",
2020-02-07T22:32:55.1022703Z ##[debug]                              "commitMessage":  "",
2020-02-07T22:32:55.1033737Z ##[debug]                              "transitionWorkItems":  "False",
2020-02-07T22:32:55.1093077Z ##[debug]                              "deleteSourceBranch":  "False"
2020-02-07T22:32:55.1093968Z ##[debug]                          },
2020-02-07T22:32:55.1094444Z ##[debug]    "autoCompleteSetBy":  {
2020-02-07T22:32:55.1094858Z ##[debug]                              "id":  "bfd34f4f-568b-46ba-a622-c57c1de60e34"
2020-02-07T22:32:55.1095271Z ##[debug]                          }
2020-02-07T22:32:55.1095662Z ##[debug]}
2020-02-07T22:32:55.1106767Z ##[debug]https://dev.azure.com/loaderb0t/awdware/_apis/git/repositories/awdware/pullrequests/10?api-version=5.0
2020-02-07T22:32:55.1488345Z ##[debug]PATCH https://dev.azure.com/loaderb0t/awdware/_apis/git/repositories/awdware/pullrequests/10?api-version=5.0 with -1-byte payload
2020-02-07T22:32:55.3262147Z ##[warning]Can't set Auto Complete to PR 10.
2020-02-07T22:32:55.3272479Z ##[debug]Processed: ##vso[task.logissue type=warning]Can't set Auto Complete to PR 10.
2020-02-07T22:32:55.3273155Z ##[warning]{"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: Invalid pull request auto complete set by id. Valid values are either the current user identity id, or an empty guid (to unset auto complete).","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2020-02-07T22:32:55.3274183Z ##[debug]Processed: ##vso[task.logissue type=warning]{"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: Invalid pull request auto complete set by id. Valid values are either the current user identity id, or an empty guid (to unset auto complete).","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2020-02-07T22:32:55.3275165Z ##[warning]The remote server returned an error: (400) Bad Request.
2020-02-07T22:32:55.3275307Z ##[debug]Processed: ##vso[task.logissue type=warning]The remote server returned an error: (400) Bad Request.
2020-02-07T22:32:55.3298466Z ##[debug]Leaving RunTask.
2020-02-07T22:32:55.3773045Z ##[section]Finishing: Trigger pull request

Something seems to be wrong with the body I guess?

I would appreciate if someone could have a look :)

Thanks,
Janik

Skip creating a pull request if one already exists

If I already have an existing pull request from the source branch to the target branch, the task returns the following error causing the build to fail.

##[error]The remote server returned an error: (409) Conflict.

Is it possible to skip creating a pull request if there is one already open?

Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.

Hi mate. Congrats for the great work.

Im having an issue with my pipeline. The full debug log is below.

Couldn't find any path variables and messing with source/target repositories didnt worked also.

Thanks in advance

2020-06-06T21:27:17.1744134Z ==============================================================================
2020-06-06T21:27:17.1744569Z Task : Create Pull Request
2020-06-06T21:27:17.1745025Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-06-06T21:27:17.1745482Z Version : 1.2.133
2020-06-06T21:27:17.1745712Z Author : Shayki Abramczyk
2020-06-06T21:27:17.1746713Z Help : More Information
2020-06-06T21:27:17.1747161Z ==============================================================================
2020-06-06T21:27:17.9727634Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c
2020-06-06T21:27:18.1467155Z ##[debug]Entering RunTask.
2020-06-06T21:27:18.1815014Z ##[debug]INPUT_SOURCEBRANCH: 'master'
2020-06-06T21:27:18.1915948Z ##[debug]INPUT_TARGETBRANCH: 'development/*'
2020-06-06T21:27:18.1948568Z ##[debug]INPUT_TITLE: 'AUTO MERGE BACK -- /MASTER to /DEVS'
2020-06-06T21:27:18.1984436Z ##[debug]INPUT_DESCRIPTION: 'AUTO MERGE BACK -- /MASTER to /DEVS'
2020-06-06T21:27:18.2023013Z ##[debug]INPUT_REVIEWERS (empty)
2020-06-06T21:27:18.2095466Z ##[debug]INPUT_REPOTYPE: 'Azure DevOps'
2020-06-06T21:27:18.2128798Z ##[debug]INPUT_ISDRAFT: 'false'
2020-06-06T21:27:18.2170837Z ##[debug] Converted to bool: False
2020-06-06T21:27:18.2206025Z ##[debug]INPUT_AUTOCOMPLETE: 'true'
2020-06-06T21:27:18.2234573Z ##[debug] Converted to bool: True
2020-06-06T21:27:18.2271581Z ##[debug]INPUT_MERGESTRATEGY: 'Merge (No fast-forward)'
2020-06-06T21:27:18.2306242Z ##[debug]INPUT_DELETESOURCH: 'false'
2020-06-06T21:27:18.2332488Z ##[debug] Converted to bool: False
2020-06-06T21:27:18.2365733Z ##[debug]INPUT_COMMITMESSAGE: 'AUTO MERGE BACK -- /MASTER to /DEVS'
2020-06-06T21:27:18.2443219Z ##[debug]INPUT_TRANSITIONWORKITEMS: 'false'
2020-06-06T21:27:18.2473911Z ##[debug] Converted to bool: False
2020-06-06T21:27:18.2515719Z ##[debug]INPUT_LINKWORKITEMS: 'false'
2020-06-06T21:27:18.2543496Z ##[debug] Converted to bool: False
2020-06-06T21:27:18.2578818Z ##[debug]INPUT_PROJECTID (empty)
2020-06-06T21:27:18.2611964Z ##[debug]INPUT_GITREPOSITORYID (empty)
2020-06-06T21:27:18.2689149Z ##[debug]INPUT_GITHUBREPOSITORY: 'embarkey-site'
2020-06-06T21:27:18.2998045Z ##[debug]Leaving RunTask.
2020-06-06T21:27:18.3153949Z ##[debug]Caught exception from task script.
2020-06-06T21:27:18.3245819Z ##[debug]Error record:
2020-06-06T21:27:18.6549073Z ##[debug]Set-Location : Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.
2020-06-06T21:27:18.6572084Z ##[debug]At D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.133\createPullRequest.ps1:57 char:13
2020-06-06T21:27:18.6592112Z ##[debug]+ Set-Location $env:Build_SourcesDirectory
2020-06-06T21:27:18.6612493Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-06-06T21:27:18.6635597Z ##[debug] + CategoryInfo : InvalidArgument: (:) [Set-Location], PSArgumentNullException
2020-06-06T21:27:18.6656346Z ##[debug] + FullyQualifiedErrorId : ArgumentNull,Microsoft.PowerShell.Commands.SetLocationCommand
2020-06-06T21:27:18.7036928Z ##[debug]
2020-06-06T21:27:18.7037507Z ##[debug]Script stack trace:
2020-06-06T21:27:18.7038418Z ##[debug]at RunTask, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.133\createPullRequest.ps1: line 57
2020-06-06T21:27:18.7039653Z ##[debug]at , D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.133\createPullRequest.ps1: line 571
2020-06-06T21:27:18.7042529Z ##[debug]at , : line 1
2020-06-06T21:27:18.7043228Z ##[debug]at , : line 22
2020-06-06T21:27:18.7043925Z ##[debug]at , : line 18
2020-06-06T21:27:18.7044609Z ##[debug]at , : line 1
2020-06-06T21:27:18.7045187Z ##[debug]Exception:
2020-06-06T21:27:18.7280355Z ##[debug]System.Management.Automation.PSArgumentNullException: Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.
2020-06-06T21:27:18.7284042Z ##[debug] at System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context)
2020-06-06T21:27:18.7285195Z ##[debug] at Microsoft.PowerShell.Commands.SetLocationCommand.ProcessRecord()
2020-06-06T21:27:18.7286129Z ##[debug] at System.Management.Automation.CommandProcessor.ProcessRecord()
2020-06-06T21:27:18.7600080Z ##[error]Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.
2020-06-06T21:27:18.7609572Z ##[debug]Processed: ##vso[task.logissue type=error]Cannot process argument because the value of argument "path" is null. Change the value of argument "path" to a non-null value.
2020-06-06T21:27:18.7611202Z ##[debug]Processed: ##vso[task.complete result=Failed]
2020-06-06T21:27:18.8651442Z ##[section]Finishing: Create Pull Request

Multi-Branch failed on subfolder

Hi, we're using your extension to auto-generate pull-requests from master to develop/* branches. Everything is working fine until we create a subfolder on develop like this "develop/MC/{branch-name}". After that the plugin fails with eror 404 trying to create pull requests on /develop/MC.

Here are some logs:
The Source Branch is: refs/heads/master
The Target Branch is: refs/heads/develop/MC
The Title is: Bajada de codigo desde Master
The Description is: Pull request automatico
Is Draft Pull Request: False
##[error]The remote server returned an error: (404) Not Found.
Finishing: Create Pull Request

That's because the branch is /develop/MC/S-20 but with the regex develop/* fails. Is there any workaround to avoid that error?

Regards

Azure DevOps - can't set auto-complete correctly

I have tried this job. It works well in creating PR but can't set auto-complete correctly. Here I attach the full log & highlight error message.

2019-12-19T13:37:06.6415997Z ==============================================================================
2019-12-19T13:37:06.6416138Z Task : Create Pull Request
2019-12-19T13:37:06.6416210Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2019-12-19T13:37:06.6416324Z Version : 1.2.48
2019-12-19T13:37:06.6416397Z Author : Shayki Abramczyk
2019-12-19T13:37:06.6416499Z Help : More Information
2019-12-19T13:37:06.6416600Z ==============================================================================
2019-12-19T13:37:08.9864952Z The Source Branch is: refs/heads/release
2019-12-19T13:37:08.9868729Z The Target Branch is: refs/heads/master
2019-12-19T13:37:08.9878750Z The Title is: rebase master
2019-12-19T13:37:08.9888808Z The Description is: rebase changes in released release branch to master branch
2019-12-19T13:37:08.9952487Z Is Draft Pull Request: False
2019-12-19T13:37:09.8193644Z *************************
2019-12-19T13:37:09.8210985Z ******** Success ********
2019-12-19T13:37:09.8223966Z *************************
2019-12-19T13:37:09.8238404Z Pull Request 1428040 created.
2019-12-19T13:37:12.5669372Z ##[warning]Can't set Auto Complete to PR 1428040.
2019-12-19T13:37:12.5686981Z ##[warning]{"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: Invalid pull request auto complete set by id. Valid values are either the current user identity id, or an empty guid (to unset auto complete).","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2019-12-19T13:37:12.5734543Z ##[warning]The remote server returned an error: (400) Bad Request.

REST call to commitsBatch is failing with: "Microsoft Internet Explorer's Enhanced Security Configuration is currently enabled on your environment...."

When I run this with system.debug=True, I get the following error message on the step:

##[debug]POST https://dev.azure.com/MYORG/90b82c25-01be-489a-8d49/_apis/git/repositories/a4a02d21-ba3c-4fc5-b90b/commitsBatch?api-version=4.1 with -1-byte payload

Microsoft Internet Explorer's Enhanced Security Configuration is currently enabled on your environment. This enhanced level of security prevents our web integration experiences from displaying or performing correctly.

I'm not sure if I will be able to change this configuration on my company's build agents. Is there possibly something else I can do, or that I'm missing?

Create multiple PRs based on feature branches

I need to keep all feature branches updated with development.
Is it possible to use it in order to open a pull request for each feature branch with source branch being development?

feature branch mask: feature/*

Multistring Description

Dear Shayki5,
Are there any options to create PR with multi-line description? As I know, multistring output vars are not allowed in ADO. We also cannot use powershell string functions in CreatePullRequest@1. Am I missed something?
Thanks in advance!

Where is the extension?

I can't seem to find this extension in the Azure DevOps marketplace. A link to it in this repo's ReadMe would be super helpful. Maybe I'm missing it?

Error for GitHub PR

I tried this task for GitHub PR and facing below error, do you have any idea?

##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.

Feature request: Possibility to set pull request creator

Hi,

First of all, great work on creating this task! It really helps us in achieving some of the more complicated flows in Azure DevOps. I was wondering if it is possible to change the 'creator' of the pull request to a specific user (e.g. by email address). Currently, the pull request is always created by the 'Project Collection Build Service' user/identity. This makes sense from a technical point of view since this is the user that is also running the pipeline that is invoking the task. However, when looking at our flow it would make more sense to assign the pull request to the person that actually invoked the pipeline in the first place. Is this something that can be done in DevOps?

Thanks!

Not working for github PRs

Hey, I like the idea of this task, but it is not working for me

steps:
- task: ShaykiAbramczyk.CreatePullRequest.CreatePullRequest.CreatePullRequest@1
  displayName: 'Create Pull Request'
  inputs:
    repoType: GitHub
    githubEndpoint: 'GitHub-iQmetrixService'
    sourceBranch: 'automated-update-storybook'
    targetBranch: master
    title: '[Azure Pipelines] Automated Update for Storybook'
    description: 'Minor version bump'

When using it, I am getting the error:
You cannot call a method on a null-valued expression.

##[error]Invalid JSON primitive: .

2020-01-27T14:47:55.6406904Z The Source Branch is: refs/heads/develop
2020-01-27T14:47:55.6410558Z The Target Branch is: refs/heads/Master
2020-01-27T14:47:55.6417512Z The Title is: Merging staging into master
2020-01-27T14:47:55.6424253Z The Description is: 
2020-01-27T14:47:55.6472004Z Is Draft Pull Request: False
2020-01-27T14:47:56.1782076Z final reviewersId: System.Collections.Hashtable
2020-01-27T14:47:56.1830634Z The reviewers are: *******
2020-01-27T14:47:56.4203251Z *************************
2020-01-27T14:47:56.4212619Z ******** Success ********
2020-01-27T14:47:56.4221162Z *************************
2020-01-27T14:47:56.4231196Z Pull Request  created.
2020-01-27T14:47:57.1430274Z ##[error]Invalid JSON primitive: .

Been getting this error lately and don't know why. Any help is appreciated.

warning should be error and automatically complete the created pr when the policy sayings at least 1 reviewer?

hi,
I use vsts's git repo and installed this extension.
When a PR is created, Is it possible to auto complete it as well when I setup a policy saying at least 1 reviewer needed?

Also the task will gives an warning when things go wrong (e.g. ##[warning]{"$id":"1","innerException":null,"message":"TF401179: An active pull request for the source and target branch already exists.","typeName":"Microsoft.TeamFoundation.Git.Server.GitPullRequestExistsException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitPullRequestExistsException","errorCode":0,"eventId":3000}

But this should be a failure other than a warning, as the next step needs to be stopped.

"The remote server retruned an error: (404) Not Found."

I try to run the extension task, under the same organization, same setting, only with the difference git repository.
The first one is working perfectly,

2020-08-12T22:04:18.7275359Z ##[section]Starting: Create Pull Request
2020-08-12T22:04:18.9102986Z ==============================================================================
2020-08-12T22:04:18.9109079Z Task : Create Pull Request
2020-08-12T22:04:18.9113093Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-08-12T22:04:18.9119175Z Version : 1.2.164
2020-08-12T22:04:18.9120125Z Author : Shayki Abramczyk
2020-08-12T22:04:18.9126951Z Help : More Information
2020-08-12T22:04:18.9127717Z ==============================================================================
2020-08-12T22:04:22.0337308Z The Source Branch is: refs/heads/SIT-RC
2020-08-12T22:04:22.0339855Z The Target Branch is: refs/heads/UAT-RC
2020-08-12T22:04:22.0340434Z The Title is: Auto merge title
2020-08-12T22:04:22.0405671Z The Description is: Descriptions goes here
2020-08-12T22:04:22.0419682Z Is Reviewers are:
2020-08-12T22:04:22.0511904Z Is Draft Pull Request: False
2020-08-12T22:04:22.4126218Z 1 new commits! perofrm a Pull Request...
2020-08-12T22:04:22.4548910Z {
2020-08-12T22:04:22.4551312Z "isDraft": "False",
2020-08-12T22:04:22.4554072Z "description": "Descriptions goes here",
2020-08-12T22:04:22.4558427Z "WorkItemRefs": "",
2020-08-12T22:04:22.4561289Z "sourceRefName": "refs/heads/SIT-RC",
2020-08-12T22:04:22.4599950Z "targetRefName": "refs/heads/UAT-RC",
2020-08-12T22:04:22.4604346Z "reviewers": "",
2020-08-12T22:04:22.4608217Z "title": "Auto merge title"
2020-08-12T22:04:22.4614251Z }
2020-08-12T22:04:22.6167183Z *************************
2020-08-12T22:04:22.6180348Z ******** Success ********
2020-08-12T22:04:22.6209747Z *************************
2020-08-12T22:04:22.6222063Z Pull Request 3847 created.
2020-08-12T22:04:22.7007262Z Set Auto Complete to PR 3847.
2020-08-12T22:04:22.7742292Z ##[section]Finishing: Create Pull Request

However, I got the error message on the second one

2020-08-12T22:19:23.3550551Z ##[section]Starting: Create Pull Request - (GIT Repo: DataHub)
2020-08-12T22:19:23.4854304Z ==============================================================================
2020-08-12T22:19:23.4854970Z Task : Create Pull Request
2020-08-12T22:19:23.4856033Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-08-12T22:19:23.4856430Z Version : 1.2.164
2020-08-12T22:19:23.4856932Z Author : Shayki Abramczyk
2020-08-12T22:19:23.4857568Z Help : More Information
2020-08-12T22:19:23.4857973Z ==============================================================================
2020-08-12T22:19:25.0215384Z The Source Branch is: refs/heads/DEV-Master
2020-08-12T22:19:25.0218433Z The Target Branch is: refs/heads/Test-Steve
2020-08-12T22:19:25.0219746Z The Title is: Pull request automerge "DEV-Master" to "Test-Steve" - Title
2020-08-12T22:19:25.0238637Z The Description is: Pull request automerge "DEV-Master" to "Test-Steve"
2020-08-12T22:19:25.0266540Z Is Reviewers are:
2020-08-12T22:19:25.0387806Z Is Draft Pull Request: False
2020-08-12T22:19:25.5888779Z ##[error]The remote server returned an error: (404) Not Found.
2020-08-12T22:19:25.6275625Z ##[section]Finishing: Create Pull Request - (GIT Repo: DataHub)

Error on try run release pipeline in Azure DevOps

Hi,

I am using this "CreatePull Request" task to create a pull request to master after completion of deployment to a stage, but I stay receiving the error "TF401027: You need the Git 'PullRequestContribute' permission to perform this action" even after configuring permissions following the instructions in the README.

Error targeting Build.SourceBranch

Hello,

When targeting $(Build.SourceBranch), the targetRefName contains refs/heads/ twice.


Yaml


  • task: CreatePullRequest@1
    displayName: 'Create Pull Request'
    inputs:
    repoType: 'Azure DevOps'
    repositorySelector: 'select'
    projectId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    gitRepositoryId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    sourceBranch: 'translation_integration'
    targetBranch: '$(Build.SourceBranch)'
    title: 'trad1'
    description: 'trad1'
    linkWorkItems: false
    env:
    System_AccessToken: $(System.AccessToken)

Logs


2020-04-06T15:05:28.3755852Z The Source Branch is: refs/heads/translation_integration
2020-04-06T15:05:28.3770810Z The Target Branch is: refs/heads/refs/heads/SCHR_PluginTranslations
2020-04-06T15:05:28.3786604Z The Title is: trad1
2020-04-06T15:05:28.3802291Z The Description is: trad1
2020-04-06T15:05:28.3858013Z Is Draft Pull Request: False
2020-04-06T15:05:28.4255973Z ##[debug]{
2020-04-06T15:05:28.4280201Z ##[debug] "isDraft": "False",
2020-04-06T15:05:28.4304446Z ##[debug] "description": "trad1",
2020-04-06T15:05:28.4328075Z ##[debug] "WorkItemRefs": "",
2020-04-06T15:05:28.4350395Z ##[debug] "sourceRefName": "refs/heads/translation_integration",
2020-04-06T15:05:28.4373848Z ##[debug] "targetRefName": "refs/heads/refs/heads/SCHR_PluginTranslations",
2020-04-06T15:05:28.4407646Z ##[debug] "reviewers": "",
2020-04-06T15:05:28.4430106Z ##[debug] "title": "trad1"
2020-04-06T15:05:28.4453016Z ##[debug]}

2020-04-06T15:05:28.6620538Z ##[debug]Leaving RunTask.
2020-04-06T15:05:28.6702329Z ##[debug]Caught exception from task script.
2020-04-06T15:05:28.6746807Z ##[debug]Error record:
2020-04-06T15:05:28.7423002Z ##[debug]CreateAzureDevOpsPullRequest : {"$id":"1","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","typeName":"Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server","typeKey":"GitPullRequestCannotBeActivated","errorCode":0,"eventId":3000}
2020-04-06T15:05:28.7444678Z ##[debug]At D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.83\createPullRequest.ps1:94 char:9
2020-04-06T15:05:28.7468891Z ##[debug]+ CreateAzureDevOpsPullRequest -teamProject $teamProject -repos ...
2020-04-06T15:05:28.7547044Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-04-06T15:05:28.7612405Z ##[debug] + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
2020-04-06T15:05:28.7613953Z ##[debug] + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateAzureDevOpsPullRequest
2020-04-06T15:05:28.7643806Z ##[debug]
2020-04-06T15:05:28.7673034Z ##[debug]Script stack trace:
2020-04-06T15:05:28.7727614Z ##[debug]at CreateAzureDevOpsPullRequest, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.83\createPullRequest.ps1: line 294
2020-04-06T15:05:28.7750352Z ##[debug]at CreatePullRequest, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.83\createPullRequest.ps1: line 94
2020-04-06T15:05:28.7832013Z ##[debug]at RunTask, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.83\createPullRequest.ps1: line 50
2020-04-06T15:05:28.7833628Z ##[debug]at , D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.83\createPullRequest.ps1: line 507
2020-04-06T15:05:28.7834967Z ##[debug]at , : line 1
2020-04-06T15:05:28.7836257Z ##[debug]at , : line 22
2020-04-06T15:05:28.7857172Z ##[debug]at , : line 18
2020-04-06T15:05:28.7878620Z ##[debug]at , : line 1
2020-04-06T15:05:28.7911730Z ##[debug]Exception:
2020-04-06T15:05:28.8071121Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: {"$id":"1","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","typeName":"Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server","typeKey":"GitPullRequestCannotBeActivated","errorCode":0,"eventId":3000}
2020-04-06T15:05:28.8382773Z ##[error]{"$id":"1","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","typeName":"Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server","typeKey":"GitPullRequestCannotBeActivated","errorCode":0,"eventId":3000}
2020-04-06T15:05:28.8400252Z ##[debug]Processed: ##vso[task.logissue type=error]{"$id":"1","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","typeName":"Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server","typeKey":"GitPullRequestCannotBeActivated","errorCode":0,"eventId":3000}
2020-04-06T15:05:28.8412332Z ##[debug]Processed: ##vso[task.complete result=Failed]
2020-04-06T15:05:28.8669479Z ##[section]Finishing: Create Pull Request

Make approvers required not optional

Hi,

Got this working and it's perfect so thanks, one request, is there a way to make the approvers required rather than optional when you create the pull request?

Cheers

Si

Error with reviewers of type Group

Hi,

As we discuss together, I tried to use a group not a team for reviewers but it does not work. I just want to notify the developers of the team (not all the team).

Regards,

Unicode-Character in Title isn't used correct in Azure DevOps

I added the unicode character 🔀 as first symbol of the title but it isn't printed correctly in Azure DevOps.

I create the Pull-Request with

  - task: CreatePullRequest@1
    inputs:
      repoType: 'Azure DevOps'
      sourceBranch: '$(Build.SourceBranch)'
      targetBranch: 'userstories/*'
      title: '🔀 Automatic Merge from master'
      linkWorkItems: false
      autoComplete: true
    env:
      System_AccessToken: $(System.AccessToken)

The symbol is printed in the pull-request as ??.

I also tried

  - task: CreatePullRequest@1
    inputs:
      repoType: 'Azure DevOps'
      sourceBranch: '$(Build.SourceBranch)'
      targetBranch: 'userstories/*'
      title: '🔀 Automatic Merge from master'
      linkWorkItems: false
      autoComplete: true
    env:
      System_AccessToken: $(System.AccessToken)

But this leads to a pull request 🔀 Automatic Merge from master

I'm able to change the title in DevOps to the Unicode which is rendered correctly.

How can I use this Unicode in the title?

Unable to add individual users as reviewers in Azure DevOps

Hi,

I think this might be a similar issue to #32 with the userentitlements REST API not working, but in this case it's Azure DevOps and not TFS. When I run this task, it is able to successfully add teams as reviewers, but fails with individual users. I've pasted some debug output below and it looks like the team is successfully resolving to an id, but the id for a user (me: [email protected]), on that team is coming up empty.

Let me know if there is any additional info I can provide, or anything i can do to help!

Here is sample pipeline output:

2020-03-25T19:43:19.7652105Z ##[debug]Evaluating condition for step: 'CreatePullRequest'
2020-03-25T19:43:19.7653941Z ##[debug]Evaluating: SucceededNode()
2020-03-25T19:43:19.7654505Z ##[debug]Evaluating SucceededNode:
2020-03-25T19:43:19.7655728Z ##[debug]=> True
2020-03-25T19:43:19.7656301Z ##[debug]Result: True
2020-03-25T19:43:19.7656818Z ##[section]Starting: CreatePullRequest
2020-03-25T19:43:19.7763089Z ==============================================================================
2020-03-25T19:43:19.7763423Z Task         : Create Pull Request
2020-03-25T19:43:19.7763918Z Description  : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-03-25T19:43:19.7764291Z Version      : 1.2.82
2020-03-25T19:43:19.7764479Z Author       : Shayki Abramczyk
2020-03-25T19:43:19.7764814Z Help         : [More Information](https://github.com/shayki5/azure-devops-create-pr-task/blob/master/README.md)
2020-03-25T19:43:19.7765206Z ==============================================================================
2020-03-25T19:43:20.6628039Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c
2020-03-25T19:43:20.8550659Z ##[debug]Entering RunTask.
2020-03-25T19:43:20.8911407Z ##[debug]INPUT_SOURCEBRANCH: 'tymarkly/wikiPipeline/Run0'
2020-03-25T19:43:20.8932872Z ##[debug]INPUT_TARGETBRANCH: 'tymarkly/masterTest'
2020-03-25T19:43:20.9020289Z ##[debug]INPUT_TITLE: 'docs: Merged changes from tymarkly/wikiTest'
2020-03-25T19:43:20.9021120Z ##[debug]INPUT_DESCRIPTION: 'Automatic merge from tymarkly/wikiTest to tymarkly/masterTest failed. This is likely due to linter
2020-03-25T19:43:20.9021836Z ##[debug]issues on tymarkly/wikiTest or a merge conflict with tymarkly/masterTest. Please resolve any issues
2020-03-25T19:43:20.9022633Z ##[debug]by checking out tymarkly/wikiPipeline/Run0 and making any necessary changes.
2020-03-25T19:43:20.9023122Z ##[debug]
2020-03-25T19:43:20.9023653Z ##[debug]Once you have finished, please get approval for this PR and complete it.
2020-03-25T19:43:20.9045628Z ##[debug]
2020-03-25T19:43:20.9057245Z ##[debug]Any changes made to tymarkly/wikiPipeline/Run0 and then merged into tymarkly/masterTest should automatically
2020-03-25T19:43:20.9068375Z ##[debug]make their way back to tymarkly/wikiTest via the master -> wikiMaster pipeline in 
2020-03-25T19:43:20.9078759Z ##[debug]language-tools/shared-templates/wiki-templates, assuming it is also running.
2020-03-25T19:43:20.9083509Z ##[debug]
2020-03-25T19:43:20.9097314Z ##[debug]Note - If you see changes outside the docs folder, please revert them and create a separate PR into 
2020-03-25T19:43:20.9111954Z ##[debug]tymarkly/masterTest for those changes. Changes outside that folder should not be made on 
2020-03-25T19:43:20.9125274Z ##[debug]tymarkly/wikiTest.'
2020-03-25T19:43:20.9152808Z ##[debug]INPUT_REVIEWERS: 'Platform - Engineering System;[email protected]'
2020-03-25T19:43:20.9180970Z ##[debug]INPUT_REPOTYPE: 'Azure DevOps'
2020-03-25T19:43:20.9207297Z ##[debug]INPUT_ISDRAFT: 'false'
2020-03-25T19:43:20.9237081Z ##[debug] Converted to bool: False
2020-03-25T19:43:20.9264784Z ##[debug]INPUT_AUTOCOMPLETE: 'false'
2020-03-25T19:43:20.9282718Z ##[debug] Converted to bool: False
2020-03-25T19:43:20.9311207Z ##[debug]INPUT_MERGESTRATEGY: 'squash'
2020-03-25T19:43:20.9338983Z ##[debug]INPUT_DELETESOURCH: 'false'
2020-03-25T19:43:20.9360149Z ##[debug] Converted to bool: False
2020-03-25T19:43:20.9386824Z ##[debug]INPUT_COMMITMESSAGE (empty)
2020-03-25T19:43:20.9441993Z ##[debug]INPUT_TRANSITIONWORKITEMS: 'false'
2020-03-25T19:43:20.9461140Z ##[debug] Converted to bool: False
2020-03-25T19:43:20.9490735Z ##[debug]INPUT_LINKWORKITEMS: 'true'
2020-03-25T19:43:20.9509754Z ##[debug] Converted to bool: True
2020-03-25T19:43:21.0293231Z ##[debug]INPUT_PROJECTID: '044346cd-32fd-479d-ba52-e29c61dcf54f'
2020-03-25T19:43:21.0294234Z ##[debug]INPUT_GITREPOSITORYID: '856ee781-8b4b-4581-9d65-ab0aad987ee3'
2020-03-25T19:43:21.0328287Z The Source Branch is: refs/heads/tymarkly/wikiPipeline/Run0
2020-03-25T19:43:21.0488000Z The Target Branch is: refs/heads/tymarkly/masterTest
2020-03-25T19:43:21.0488385Z The Title is: docs: Merged changes from tymarkly/wikiTest
2020-03-25T19:43:21.0488808Z The Description is: Automatic merge from tymarkly/wikiTest to tymarkly/masterTest failed. This is likely due to linter
2020-03-25T19:43:21.0489312Z issues on tymarkly/wikiTest or a merge conflict with tymarkly/masterTest. Please resolve any issues
2020-03-25T19:43:21.0489748Z by checking out tymarkly/wikiPipeline/Run0 and making any necessary changes.
2020-03-25T19:43:21.0489967Z 
2020-03-25T19:43:21.0490198Z Once you have finished, please get approval for this PR and complete it.
2020-03-25T19:43:21.0490422Z 
2020-03-25T19:43:21.0490713Z Any changes made to tymarkly/wikiPipeline/Run0 and then merged into tymarkly/masterTest should automatically
2020-03-25T19:43:21.0491139Z make their way back to tymarkly/wikiTest via the master -> wikiMaster pipeline in 
2020-03-25T19:43:21.0491534Z language-tools/shared-templates/wiki-templates, assuming it is also running.
2020-03-25T19:43:21.0491754Z 
2020-03-25T19:43:21.0492034Z Note - If you see changes outside the docs folder, please revert them and create a separate PR into 
2020-03-25T19:43:21.0492458Z tymarkly/masterTest for those changes. Changes outside that folder should not be made on 
2020-03-25T19:43:21.0492754Z tymarkly/wikiTest.
2020-03-25T19:43:21.0492947Z Is Draft Pull Request: False
2020-03-25T19:43:21.0666868Z ##[debug]GET https://vsaex.dev.azure.com/intentional/_apis/userentitlements?api-version=4.1-preview.1 with 0-byte payload
2020-03-25T19:43:21.9869059Z ##[debug]received 160189-byte response of content type application/json; charset=utf-8; api-version=4.1-preview.1
2020-03-25T19:43:22.2055849Z ##[debug]GET https://dev.azure.com/intentional/_apis/projects/intent/teams?api-version=4.1-preview.1 with 0-byte payload
2020-03-25T19:43:22.2959250Z ##[debug]received -1-byte response of content type application/json; charset=utf-8; api-version=4.1-preview.1
2020-03-25T19:43:22.3056148Z ##[debug]Platform - Engineering System;[email protected]
2020-03-25T19:43:22.3341614Z The reviewers are: Platform - Engineering System [email protected]
2020-03-25T19:43:22.4430829Z ##[debug]{
2020-03-25T19:43:22.4442491Z ##[debug]    "compareVersion":  {
2020-03-25T19:43:22.4454143Z ##[debug]                           "versionOptions":  0,
2020-03-25T19:43:22.4465123Z ##[debug]                           "versionType":  0,
2020-03-25T19:43:22.4478151Z ##[debug]                           "version":  "tymarkly/wikiPipeline/Run0"
2020-03-25T19:43:22.4489938Z ##[debug]                       },
2020-03-25T19:43:22.4502169Z ##[debug]    "itemVersion":  {
2020-03-25T19:43:22.4515305Z ##[debug]                        "versionOptions":  0,
2020-03-25T19:43:22.4528913Z ##[debug]                        "versionType":  0,
2020-03-25T19:43:22.4541695Z ##[debug]                        "version":  "tymarkly/masterTest"
2020-03-25T19:43:22.4553653Z ##[debug]                    },
2020-03-25T19:43:22.4564913Z ##[debug]    "$top":  101,
2020-03-25T19:43:22.4578213Z ##[debug]    "includeWorkItems":  "true"
2020-03-25T19:43:22.4590998Z ##[debug]}
2020-03-25T19:43:22.4622743Z ##[debug]POST https://dev.azure.com/intentional/044346cd-32fd-479d-ba52-e29c61dcf54f/_apis/git/repositories/856ee781-8b4b-4581-9d65-ab0aad987ee3/commitsBatch?api-version=4.1 with -1-byte payload
2020-03-25T19:43:22.5572540Z ##[debug]received 2703-byte response of content type application/json; charset=utf-8; api-version=4.1
2020-03-25T19:43:22.5597952Z ##[debug]@{count=4; value=System.Object[]}
2020-03-25T19:43:22.5742371Z ##[debug]{
2020-03-25T19:43:22.5753178Z ##[debug]    "sourceRefName":  "refs/heads/tymarkly/wikiPipeline/Run0",
2020-03-25T19:43:22.5763791Z ##[debug]    "title":  "docs: Merged changes from tymarkly/wikiTest",
2020-03-25T19:43:22.5774175Z ##[debug]    "WorkItemRefs":  [
2020-03-25T19:43:22.5784997Z ##[debug]                         null
2020-03-25T19:43:22.5796861Z ##[debug]                     ],
2020-03-25T19:43:22.5812736Z ##[debug]    "description":  "Automatic merge from tymarkly/wikiTest to tymarkly/masterTest failed. This is likely due to linter\nissues on tymarkly/wikiTest or a merge conflict with tymarkly/masterTest. Please resolve any issues\nby checking out tymarkly/wikiPipeline/Run0 and making any necessary changes.\n\nOnce you have finished, please get approval for this PR and complete it.\n\nAny changes made to tymarkly/wikiPipeline/Run0 and then merged into tymarkly/masterTest should automatically\nmake their way back to tymarkly/wikiTest via the master -\u003e wikiMaster pipeline in \nlanguage-tools/shared-templates/wiki-templates, assuming it is also running.\n\nNote - If you see changes outside the docs folder, please revert them and create a separate PR into \ntymarkly/masterTest for those changes. Changes outside that folder should not be made on \ntymarkly/wikiTest.",
2020-03-25T19:43:22.5818175Z ##[debug]    "reviewers":  [
2020-03-25T19:43:22.5839914Z ##[debug]                      {
2020-03-25T19:43:22.6285627Z ##[debug]                          "id":  "ed1d2c36-a4e1-4081-8c7a-22fe14cae074"
2020-03-25T19:43:22.6309803Z ##[debug]                      },
2020-03-25T19:43:22.6317879Z ##[debug]                      {
2020-03-25T19:43:22.6318631Z ##[debug]                          "id":  ""
2020-03-25T19:43:22.6319249Z ##[debug]                      }
2020-03-25T19:43:22.6326575Z ##[debug]                  ],
2020-03-25T19:43:22.6327383Z ##[debug]    "isDraft":  "False",
2020-03-25T19:43:22.6328088Z ##[debug]    "targetRefName":  "refs/heads/tymarkly/masterTest"
2020-03-25T19:43:22.6329942Z ##[debug]}
2020-03-25T19:43:22.6333472Z ##[debug]https://dev.azure.com/intentional/044346cd-32fd-479d-ba52-e29c61dcf54f/_apis/git/repositories/856ee781-8b4b-4581-9d65-ab0aad987ee3/pullrequests?api-version=5.0
2020-03-25T19:43:22.6334785Z ##[debug]POST https://dev.azure.com/intentional/044346cd-32fd-479d-ba52-e29c61dcf54f/_apis/git/repositories/856ee781-8b4b-4581-9d65-ab0aad987ee3/pullrequests?api-version=5.0 with -1-byte payload
2020-03-25T19:43:22.7397214Z ##[debug]Leaving RunTask.
2020-03-25T19:43:22.7661687Z ##[debug]Caught exception from task script.
2020-03-25T19:43:22.7689014Z ##[debug]Error record:
2020-03-25T19:43:22.8178199Z ##[debug]CreateAzureDevOpsPullRequest : {"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: The identity  is not recognized.","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2020-03-25T19:43:22.8190740Z ##[debug]At D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.82\createPullRequest.ps1:94 char:9
2020-03-25T19:43:22.8202253Z ##[debug]+         CreateAzureDevOpsPullRequest -teamProject $teamProject -repos ...
2020-03-25T19:43:22.8213559Z ##[debug]+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-03-25T19:43:22.8227677Z ##[debug]    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
2020-03-25T19:43:22.8243554Z ##[debug]    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateAzureDevOpsPullRequest
2020-03-25T19:43:22.8257436Z ##[debug] 
2020-03-25T19:43:22.8278291Z ##[debug]Script stack trace:
2020-03-25T19:43:22.8318318Z ##[debug]at CreateAzureDevOpsPullRequest, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.82\createPullRequest.ps1: line 294
2020-03-25T19:43:22.8331261Z ##[debug]at CreatePullRequest, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.82\createPullRequest.ps1: line 94
2020-03-25T19:43:22.8344045Z ##[debug]at RunTask, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.82\createPullRequest.ps1: line 50
2020-03-25T19:43:22.8355421Z ##[debug]at <ScriptBlock>, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.82\createPullRequest.ps1: line 506
2020-03-25T19:43:22.8366624Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-03-25T19:43:22.8379729Z ##[debug]at <ScriptBlock>, <No file>: line 22
2020-03-25T19:43:22.8393640Z ##[debug]at <ScriptBlock>, <No file>: line 18
2020-03-25T19:43:22.8409394Z ##[debug]at <ScriptBlock>, <No file>: line 1
2020-03-25T19:43:22.8429210Z ##[debug]Exception:
2020-03-25T19:43:22.8471151Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: {"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: The identity  is not recognized.","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2020-03-25T19:43:22.8730693Z ##[error]{"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: The identity  is not recognized.","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2020-03-25T19:43:22.8740672Z ##[debug]Processed: ##vso[task.logissue type=error]{"$id":"1","innerException":null,"message":"Invalid argument value.\r\nParameter name: The identity  is not recognized.","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
2020-03-25T19:43:22.8747579Z ##[debug]Processed: ##vso[task.complete result=Failed]
2020-03-25T19:43:22.9015917Z ##[section]Finishing: CreatePullRequest

Broken after 1.2.77

Hi, after the upgrade of 1.2.77 version our pipeline is raising 400 error.

Here is the debug log:

2020-02-10T14:28:21.3903799Z ##[section]Starting: Create Pull Request 2020-02-10T14:28:21.4003458Z ============================================================================== 2020-02-10T14:28:21.4003515Z Task : Create Pull Request 2020-02-10T14:28:21.4003563Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch. 2020-02-10T14:28:21.4003596Z Version : 1.2.77 2020-02-10T14:28:21.4003627Z Author : Shayki Abramczyk 2020-02-10T14:28:21.4003673Z Help : [More Information](https://github.com/shayki5/azure-devops-create-pr-task/blob/master/README.md) 2020-02-10T14:28:21.4003714Z ============================================================================== 2020-02-10T14:28:22.2738031Z ##[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c 2020-02-10T14:28:22.4411770Z ##[debug]Entering RunTask. 2020-02-10T14:28:22.4866181Z ##[debug]INPUT_SOURCEBRANCH: 'master' 2020-02-10T14:28:22.4897174Z ##[debug]INPUT_TARGETBRANCH: 'develop/*' 2020-02-10T14:28:22.4992904Z ##[debug]INPUT_TITLE: 'Bajada de codigo desde Master' 2020-02-10T14:28:22.4993472Z ##[debug]INPUT_DESCRIPTION: 'Pull request automatico' 2020-02-10T14:28:22.4993765Z ##[debug]INPUT_REVIEWERS (empty) 2020-02-10T14:28:22.5040010Z ##[debug]INPUT_REPOTYPE: 'Azure DevOps' 2020-02-10T14:28:22.5106781Z ##[debug]INPUT_ISDRAFT: 'false' 2020-02-10T14:28:22.5111333Z ##[debug] Converted to bool: False 2020-02-10T14:28:22.5139376Z ##[debug]INPUT_AUTOCOMPLETE: 'true' 2020-02-10T14:28:22.5161176Z ##[debug] Converted to bool: True 2020-02-10T14:28:22.5190526Z ##[debug]INPUT_MERGESTRATEGY: 'noFastForward' 2020-02-10T14:28:22.5222265Z ##[debug]INPUT_DELETESOURCH: 'false' 2020-02-10T14:28:22.5236720Z ##[debug] Converted to bool: False 2020-02-10T14:28:22.5263266Z ##[debug]INPUT_COMMITMESSAGE (empty) 2020-02-10T14:28:22.5292010Z ##[debug]INPUT_TRANSITIONWORKITEMS: 'false' 2020-02-10T14:28:22.5311116Z ##[debug] Converted to bool: False 2020-02-10T14:28:22.5338105Z ##[debug]INPUT_LINKWORKITEMS: 'true' 2020-02-10T14:28:22.5356960Z ##[debug] Converted to bool: True 2020-02-10T14:28:22.5386046Z ##[debug]INPUT_PROJECTID (empty) 2020-02-10T14:28:22.5412416Z ##[debug]INPUT_GITREPOSITORYID (empty) 2020-02-10T14:28:22.8874962Z The Source Branch is: refs/heads/master 2020-02-10T14:28:22.8884557Z The Target Branch is: refs/heads/develop/BOR 2020-02-10T14:28:22.8893774Z The Title is: Bajada de codigo desde Master 2020-02-10T14:28:22.8900511Z The Description is: Pull request automatico 2020-02-10T14:28:22.8950994Z Is Draft Pull Request: False 2020-02-10T14:28:23.0359173Z ##[debug]{ 2020-02-10T14:28:23.0373510Z ##[debug] "compareVersion": { 2020-02-10T14:28:23.0386297Z ##[debug] "versionOptions": 0, 2020-02-10T14:28:23.0400158Z ##[debug] "versionType": 0, 2020-02-10T14:28:23.0413348Z ##[debug] "version": "master" 2020-02-10T14:28:23.0426706Z ##[debug] }, 2020-02-10T14:28:23.0440140Z ##[debug] "itemVersion": { 2020-02-10T14:28:23.0453589Z ##[debug] "versionOptions": 0, 2020-02-10T14:28:23.0466619Z ##[debug] "versionType": 0, 2020-02-10T14:28:23.0479850Z ##[debug] "version": "develop/BOR" 2020-02-10T14:28:23.1519469Z ##[debug] }, 2020-02-10T14:28:23.1660599Z ##[debug] "$top": 101, 2020-02-10T14:28:23.1670247Z ##[debug] "includeWorkItems": "true" 2020-02-10T14:28:23.1671132Z ##[debug]} 2020-02-10T14:28:23.1765178Z ##[debug]POST https://dev.azure.com/innovationstrategies//_apis/git/repositories//commitsBatch?api-version=4.1 with -1-byte payload 2020-02-10T14:28:23.5844729Z ##[debug]Leaving RunTask. 2020-02-10T14:28:23.6105218Z ##[debug]Caught exception from task script. 2020-02-10T14:28:23.6138970Z ##[debug]Error record: 2020-02-10T14:28:23.6778819Z ##[debug]Invoke-RestMethod : {"$id":"1","innerException":null,"message":"A valid repository name is required.\r\nParameter name: Name","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer","typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0} 2020-02-10T14:28:23.6786660Z ##[debug]At D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1:365 char:17 2020-02-10T14:28:23.6798701Z ##[debug]+ ... $response = Invoke-RestMethod -Method Post -Uri $url -Headers $header ... 2020-02-10T14:28:23.6810436Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2020-02-10T14:28:23.6821971Z ##[debug] + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption 2020-02-10T14:28:23.6833636Z ##[debug] + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand 2020-02-10T14:28:23.6906135Z ##[debug]Script stack trace: 2020-02-10T14:28:23.6906994Z ##[debug]at GetLinkedWorkItems, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1: line 365 2020-02-10T14:28:23.6907388Z ##[debug]at CreateAzureDevOpsPullRequest, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1: line 257 2020-02-10T14:28:23.6907771Z ##[debug]at CreatePullRequest, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1: line 94 2020-02-10T14:28:23.6918662Z ##[debug]at <ScriptBlock>, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1: line 61 2020-02-10T14:28:23.6930965Z ##[debug]at RunTask, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1: line 57 2020-02-10T14:28:23.6942566Z ##[debug]at <ScriptBlock>, D:\a\_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.77\createPullRequest.ps1: line 463 2020-02-10T14:28:23.6953858Z ##[debug]at <ScriptBlock>, <No file>: line 1 2020-02-10T14:28:23.6964968Z ##[debug]at <ScriptBlock>, <No file>: line 22 2020-02-10T14:28:23.6976164Z ##[debug]at <ScriptBlock>, <No file>: line 18 2020-02-10T14:28:23.6987380Z ##[debug]at <ScriptBlock>, <No file>: line 1 2020-02-10T14:28:23.7007143Z ##[debug]Exception: 2020-02-10T14:28:23.7544743Z ##[debug]System.Net.WebException: The remote server returned an error: (400) Bad Request. 2020-02-10T14:28:23.7581351Z ##[debug] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) 2020-02-10T14:28:23.7582315Z ##[debug] at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() 2020-02-10T14:28:23.7631733Z ##[error]The remote server returned an error: (400) Bad Request. 2020-02-10T14:28:23.7640307Z ##[debug]Processed: ##vso[task.logissue type=error]The remote server returned an error: (400) Bad Request. 2020-02-10T14:28:23.7654307Z ##[debug]Processed: ##vso[task.complete result=Failed] 2020-02-10T14:28:23.7901341Z ##[section]Finishing: Create Pull Request 2020-02-10T14:28:23.7915631Z ##[debug]Evaluating condition for step: 'Checkout Iberostar.diCRS@master to s' 2020-02-10T14:28:23.7916503Z ##[debug]Evaluating: AlwaysNode() 2020-02-10T14:28:23.7916601Z ##[debug]Evaluating AlwaysNode: 2020-02-10T14:28:23.7917609Z ##[debug]=> True 2020-02-10T14:28:23.7917845Z ##[debug]Result: True

It seems that some mandatory param(maybe repositoryName) is missing.

Multi-target Branch not working

Hi mate!

It used to work, but stopped suddently.
I have three sub-branches under my /development.
It seems to ignore all the other branches and try to "merge" only itself.

2020-08-06T01:33:54.9105831Z The Source Branch is: refs/heads/development/master
2020-08-06T01:33:54.9124614Z The Target Branch is: refs/heads/development/master
2020-08-06T01:33:54.9222902Z The Title is: AUTO MERGE BACK --- /DEV/Master to /DEV/*
2020-08-06T01:33:54.9249845Z The Description is:
2020-08-06T01:33:54.9312475Z Is Reviewers are:
2020-08-06T01:33:54.9463717Z Is Draft Pull Request: False
2020-08-06T01:33:55.2098341Z ##[warning]***************************************************************
2020-08-06T01:33:55.2142000Z ##[warning]There are no new commits in the source branch, no PR is needed!
2020-08-06T01:33:55.2184912Z ##[warning]***************************************************************
2020-08-06T01:33:55.2753436Z ##[section]Finishing: Create Pull Request

Can't work in Release pipeline

extension correctly work with CI pipeline, but can't work in Release Pipeline, error about permission (permission to repo correct):
##[error]{"$id":"1","innerException":null,"message":"TF401027: You need the Git 'PullRequestContribute' permission to perform this action. Details: identity 'Build\\4b2e01e1-3005-4ff3-af8d-e00fa54e7e46', scope 'repository'.","typeName":"Microsoft.TeamFoundation.Git.Server.GitNeedsPermissionException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitNeedsPermissionException","errorCode":0,"eventId":3000}

Object reference not set to an instance of an object

image

26-05-26T17:53:09.4059963Z ##[error]{"$id":"1","innerException":null,"message":"Object reference not set to an instance of an object.","typeName":"System.NullReferenceException, mscorlib","typeKey":"NullReferenceException","errorCode":0,"eventId":0}

(404) Not Found error when you add approver in Azure DevOps Server 2019

I got (404) Not Found error when you add approver in Azure DevOps Server 2019

Below is the debug message

2020-03-17T21:09:47.6555011Z ##[debug]https://tfs/LDTS/_apis/userentitlements?api-version=4.1-preview.1
2020-03-17T21:09:47.6678126Z ##[debug]GET https://tfs/LDTS/_apis/userentitlements?api-version=4.1-preview.1 with 0-byte payload

User Entitlements API doesn't exist in Azure DevOps Server 2019.
You may use "_apis/IdentityPicker/Identities" instead.
Would it be possible to fix this?

Question Windows Machines only

Hi I'm getting a 403 forbidden. Yet I've enabled OAuth. Might this be due to the online server not being Windows. I'm unsure as this is Azure DevOps online not local prem.

Thanks for any assistance
Guy

Azure DevOps - Link Work Items

The Pull Requests created in the Azure DevOps Release Pipeline are not automatically linking the associated work items, despite that selection being checked.
image
Is it possible I've missed a necessary permission? No errors appear to be reported, I just have to manually add the items when I approve/complete the request.

Unable to create pull request

Hey shayki5!!

I have tried to create the pull request using classic editor using "Create Pull Request".

Steps i have followed`
I have provided create pull request---allow in project settings repositories
Enabled Allow scripts to access the OAuth token
added task in class editor.

Task ran successfully but the pull request is not created.

guide me where i need to provide the PAT.

Getting this error:

The version descriptor could not be resolved to a version in the repository

PWSH

Feature:
¿migrate to pssh core, and run in any platform?
only for win is bad idea.

TF401027: You need the Git 'PullRequestContribute' permission to perform this action

Hi,

I used your PR as a task in our Pipeline and I have encountered error below.

I have followed the Azure DevOps Repository guide.

  • Ticked allow scripts to access the OAuth token
  • Allow permission to the Build service account for Contribute Pull request

Only thing I did NOT setup is this yml since I don't know where to add it. I can't update your yaml in the release.
env:
System_AccessToken: $(System.AccessToken)

2020-04-06T22:36:18.4039154Z Task : Create Pull Request
2020-04-06T22:36:18.4039594Z Description : Automatically create a Pull Request for Azure DevOps or GitHub repository from Build or Release pipeline, supports also multi target branch.
2020-04-06T22:36:18.4040045Z Version : 1.2.84
2020-04-06T22:36:18.4040266Z Author : Shayki Abramczyk
2020-04-06T22:36:18.4040651Z Help : More Information
2020-04-06T22:36:18.4041114Z ==============================================================================
2020-04-06T22:36:19.4683155Z The Source Branch is: refs/heads/dev
2020-04-06T22:36:19.4684950Z The Target Branch is: refs/heads/master
2020-04-06T22:36:19.4692491Z The Title is: Create Pull Request from Dev to Master
2020-04-06T22:36:19.4693197Z The Description is: Automatically create a Pull Request from dev to master after successful deployment
2020-04-06T22:36:19.4731382Z Is Draft Pull Request: False
2020-04-06T22:36:20.0406138Z ##[error]{"$id":"1","innerException":null,"message":"TF401027: You need the Git 'PullRequestContribute' permission to perform this action. Details: identity 'Build\8ea776f8-44ff-4a9c-acaf-5a0b6553bf20', scope 'repository'.","typeName":"Microsoft.TeamFoundation.Git.Server.GitNeedsPermissionException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitNeedsPermissionException","errorCode":0,"eventId":3000}
2020-04-06T22:36:20.0898548Z ##[section]Finishing: Create Pull Request

Thank you very much! Looking forward for your response!

Cheers,
Charleston

How to enable "auto-complete"

I am new to the extension, and I have trouble setting "auto-complete"

I have checked the "Set Auto complete" option, but when i checked the pull request, the auto-complete is not set. May I ask if I missed any step to get it work?

Page Not found error

Create Pull request task is showing Page not found error on selecting 'Set Auto Complete'. Pull request is being created but error in auto complete. I am using Azure DevOps.


Pull Request 440 created.
##[debug]'link'/_apis/graph/users?api-version=4.1-preview.1
##[debug]GET 'link'/_apis/graph/users?api-version=4.1-preview.1 with 0-byte payload
##[debug]Leaving RunTask.
##[debug]Caught exception from task script.
##[debug]Error record:
##[debug]CreateAzureDevOpsPullRequest :
##[debug]
##[debug]

##[debug] Page not found.
##[debug] html {

##[debug] height: 100%;
##[debug]}
##[debug]
##[debug]body {
##[debug] font-family: "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Ubuntu, Arial, sans-serif, "Apple Color Emoji",
##[debug] "Segoe UI Emoji", "Segoe UI Symbol";

Set Merge Type For PR Auto-Complete

My organization only allows Squash merge types on PRs to our master branch. Currently, if I have this extension auto-complete the PR, I get the following warning:

Project Collection Build Service (My-Company) set the pull request to automatically complete when the following policies succeed:
Merge type: Merge (no fast-forward) is forbidden by policy
Changes will be merged into master. Branch develop will be retained. Work items will be unchanged.

Is there a way we could set the merge type after checking the "set auto-complete" option for the task?

Multi target branch

Hi!
How I can manage the Target branch name when I want to send a multi pull request and I have my branches into a folder, like this.

image

Pull Requests to another repository

In one of the project I am working on, the team is using multiple repositories.
One of theese is the primary and a number of others are forks of that.
Whenever the primary is updated one of the team members is maunally creating pull requests for the individual forks.

Would it be possible to add functionality to target another repo instead of using the same as both source and target?

Unable to connect to Remote Error

Hello,

I am trying to use this task for azure devops git repo. It is throwing

  1. Unable to connect to Remote error on self hosted agent (Windows)
  2. The remote server returned 404 error on Hosted agent (Windows)
    I have added the option to use OAuth in Agent job
    Allowed contribute to Pull request permission to build users.
    Can you help out in understanding why i am getting this error.

Pull Request Does not Get Created but No Error and tells Successful

I have used this in my Azure Pipelines to create a pull request from the Development branch to Master Branch automatically. In the logs it tells you the Pull Request Creation was Successful. However the pull request is not created and the place where the pull request number is shown in the logs, there is nothing there. Its just blank.
I think in addition to deciding if the response is not blank it succeeded, It should check whether there is a Pull Request Number and if that is not there log the error instead. That way it makes it easier to troubleshoot. Right now I don't know why its failing and I have tried everything I could think of and failed to find the reason for failure.
Appreciate if you could help fixing it or giving some advise to troubleshoot it if you have already come across this situation. Thanks in advance.

Remote server returned a 404

Don't know what I'm doing wrong. Added all the permissions to the Project Collection Service Users and everything.

image

Fail in setting auto-complete

Hi, I suddenly found that the task will fail in setting auto complete now. I have turned on the debug mode and the log is as below.

According to the log, I think the exception should happen when requesting user graph api.
API in official document is https://vssps.dev.azure.com/xxx/_apis/graph/users?api-version=5.1-preview.1 (it works well)
What I see in log is https://xxx.visualstudio.com/_apis/graph/users?api-version=4.1-preview.1

Does it mean that Azure Dev Ops has changed their API? I have checked that using 4.1-preview.1 as api-version still works.

Debug log
##[debug]GET https://xxx.visualstudio.com/_apis/graph/users?api-version=4.1-preview.1 with 0-byte payload
##[debug]Leaving RunTask.
##[debug]Caught exception from task script.
##[debug]Error record:
##[debug]CreateAzureDevOpsPullRequest :
##[debug]Azure DevOps
##[debug]Service Status Support @AzureDevOps
##[debug]At D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.59\createPullRequest.ps1:80 char:9
##[debug]+ CreateAzureDevOpsPullRequest -sourceBranch $sourceBranch -tar ...
##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##[debug] + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
##[debug] + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CreateAzureDevOpsPullRequest
##[debug]
##[debug]Script stack trace:
##[debug]at CreateAzureDevOpsPullRequest, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.59\createPullRequest.ps1: line 276
##[debug]at CreatePullRequest, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.59\createPullRequest.ps1: line 80
##[debug]at RunTask, D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.59\createPullRequest.ps1: line 38
##[debug]at , D:\a_tasks\CreatePullRequest_2f159376-316b-4652-a49c-392f9d534113\1.2.59\createPullRequest.ps1: line 438
##[debug]at , : line 1
##[debug]at , : line 22
##[debug]at , : line 18
##[debug]at , : line 1
##[debug]Exception:
##[debug]Microsoft.PowerShell.Commands.WriteErrorException:
##[debug]Azure DevOps
##[debug]Service Status Support @AzureDevOps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.