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

Method invocation failed because [System.String] does not contain a method named 'ForEach' #140

Closed anilpatnik closed 2 years ago

anilpatnik commented 2 years ago

issue is happening for Merge Strategy = Merge (No fast-forward) tried with other options but working for Squash commit only image

shayki5 commented 2 years ago

Hi, can you try running it with system.debug = true (both in merge & squash) and share the logs? Thanks!

anilpatnik commented 2 years ago

Merge Strategy = Merge (No fast-forward)

image

anilpatnik commented 2 years ago

getting the same error now for Squash commit as well :(

shayki5 commented 2 years ago

I might know why, i tried to fix it, can you try now?

anilpatnik commented 2 years ago

just tried, same error again

shayki5 commented 2 years ago

Can you verify the task version is 1.2.330?

anilpatnik commented 2 years ago

image

shayki5 commented 2 years ago

can you check please also inside the pipeline logs that it's 1.2.330?

anilpatnik commented 2 years ago

image

anilpatnik commented 2 years ago

not sure but it seems the errored code line numbers are different from your commit?

image

anilpatnik commented 2 years ago

image

shayki5 commented 2 years ago

yes, it's in line 845, I can't reproduce it in my repo :( it looks like when only 1 work item linked it causing the issue, but in my repo it works :/

shayki5 commented 2 years ago

I'v added a print to try debug it, can you try now? (and share the logs)

anilpatnik commented 2 years ago

same error line# changed to 846

image

shayki5 commented 2 years ago

Thank you. I uploaded a fix, I hope it will really fix it (I can't reproduce it so I can't be sure...). Can you try now please?

anilpatnik commented 2 years ago

It's working now. thank you 👍