jycouet / VSTSExtensions

MIT License
30 stars 11 forks source link

Renovate Me PRs Autocompletion not working in Azure Devops #50

Closed salahBouragba closed 1 year ago

salahBouragba commented 2 years ago

Describe the bug The PRs created by the Renovate Me task are not automatically merged even when automerge is set to true

To Reproduce Steps to reproduce the behavior:

  1. Configure renovate with the following params ("automerge": true, "automergeType": "pr", "platformAutomerge": true, "automergeStrategy": "squash")
  2. Modify the main branch policy to only allow "Squash merge" type
  3. Create a new CI pipeline in azure devops with Renovate Me task
  4. Go to the generated PR
  5. See that it's not automatically completed

Expected behavior The PR should be complete

Screenshots 151967581-e54b80e8-c9a5-4db8-8b0e-5b835f7ea184

Desktop (please complete the following information):

jycouet commented 2 years ago

I never used this, but with the screenshot it seems that everything is "well done". What does the orange icon mean?

salahBouragba commented 2 years ago

It's the Azure Devops feature that marks the PR as autoComplete so when all policies are good, the PR will be automatically merged

jycouet commented 2 years ago

As you say, it's a "Azure Devops feature... PR will be automatically merged". So what Renovate Me can do for that?

Sayali1638 commented 2 years ago

I am trying to run whitesource renovate using azure pipeline. I have followed this documentation. My pipeline looks as follows: image

I have added the linux agent for the agent pool. When I try running the pipeline I face following error:

[error]self signed certificate in certificate chain

I have tried running it as mentioned but it is not working for me.

Please let me know how do I resolve the error. I am also not sure of where do I place the key provided by renovate.

jycouet commented 2 years ago

As it has nothing to do with this issue, I created a dedicated one.

Sayali1638 commented 2 years ago

Hello,

The certificate error is resolved but not sure why I am getting following error:

[error]exec(npx, renovate@latest "ExtenSURE"/"EagleView" --platform azure --endpoint http://azuredevops.co.in/FB_Collection1/ --token *** ): Error: The process '/home/sayali_bhase/agent/_work/_tool/node/8.8.0/x64/bin/npx' failed with exit code 1

[error]Error: exec(npx, renovate@latest "ExtenSURE"/"EagleView" --platform azure --endpoint http://azuredevops.co.in/FB_Collection1/ --token *** ): Error: The process '/home/sayali_bhase/agent/_work/_tool/node/8.8.0/x64/bin/npx' failed with exit code 1

Finishing: Renovate

I also checked it on internet but did not find any solution. Please let me know.

sheldonhull commented 2 years ago

I got this to work. It was a little tricky but not renovates fault here I think.

So first off, if you have a review policy it can impact these things, and I recommend to protect with a review policy for the various paths/code you have so it can't merge without approval of the right folks.

This combination works for me, but I'm not saying all of it is required.

 "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "dependencyDashboard": true,
  "dependencyDashboardAutoclose": true,
  "platformAutomerge": true,
  "azureWorkItemId": workitemid, // just create a bug and link work automatically to this to fufill the requirements of policies,
  "automerge": true,
  "automergeStrategy": "squash",
  "semanticCommitType": "chore",
  "semanticCommitScope": "deps",
  "rebaseWhen": "behind-base-branch",
  "prCreation": "not-pending",
  "pruneStaleBranches": true,
  "unicodeEmoji": true,
  "stabilityDays": 5,

Something like that with other various settings worked out great and I get PR's generated with dependencies and all like clockwork. I love this extension so thank you!