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

Stops creating PR's after finding a branch with no changes #105

Closed ssam005 closed 3 years ago

ssam005 commented 3 years ago

Steps to reproduce:

  1. create the following branch structure branch1/main 1/0 branch2/main 0/0 branch3/main 3/0 main
  2. configure task to us multiple target branches targetBranch: '*/main'
  3. run pipeline.

A PR will be created for main -> branch1/main there will be a message in the log that branch2/main doesn't require a pull request. then the job is completed successfully.

the exit 0 in the line below is what I think the problem is, but I don't know how to test this stuff.

https://github.com/shayki5/azure-devops-create-pr-task/blob/2f8d8f9a75491c895f7e3f73c7ce0df19790430b/task/createPullRequest.ps1#L440

shayki5 commented 3 years ago

Hi @ssam005, good catch! I didn't think about this scenario. I will fix it soon :)

shayki5 commented 3 years ago

@ssam005 I think I solved it :) can you check now?

ssam005 commented 3 years ago

Sure. Do I need to update the extension in azure first, or is there another way to test it?

shayki5 commented 3 years ago

By default it's updated automatically, so you can just run the pipeline :)

ssam005 commented 3 years ago

It worked!! Thanks.

FYI it took about a day before it updated.