Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mergeStrategy parameter is not working #1375

Closed
1 task done
philipp-naused opened this issue Sep 30, 2024 · 2 comments · Fixed by #1376
Closed
1 task done

mergeStrategy parameter is not working #1375

philipp-naused opened this issue Sep 30, 2024 · 2 comments · Fixed by #1376

Comments

@philipp-naused
Copy link

Describe the bug
The documentation for the dependabot@V2 parameter mergeStrategy says that the default value is squash.
But when I don't specify a value, Dependabot tries to auto-compete the PR with the "Merge (no fast forward)" strategy.
Based on This site, that is the correct default value.

Categorization

To Reproduce
Steps to reproduce the behavior:

  1. Confiture Dependabot with these settings:
- task: dependabot@2
  displayName: 'Dependabot'
  inputs:
    setAutoComplete: true
  1. Run the pipeline

Expected behavior
The PR is created with the merge strategy squash

Logs and screenshots

Creating pull request 'Bump dotnet-reportgenerator-globaltool from 5.3.9 to 5.3.10'...
 - Pushing 1 change(s) to branch 'dependabot/nuget/main/dotnet-reportgenerator-globaltool-5.3.10'...
 - Creating pull request to merge 'dependabot/nuget/main/dotnet-reportgenerator-globaltool-5.3.10' into 'main'...
 - Adding dependency metadata to pull request properties...
 - Setting auto-complete...
##[error]Failed to create pull request: Error: Merge strategy is not alowed by policy
Error: Merge strategy is not alowed by policy
    at RestClient.<anonymous> (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.35.947/node_modules/typed-rest-client/RestClient.js:204:31)
    at Generator.next (<anonymous>)
    at fulfilled (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.35.947/node_modules/typed-rest-client/RestClient.js:7:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 400,
  result: {
    '$id': '1',
    innerException: null,
    message: 'Merge strategy is not alowed by policy',
    typeName: 'Microsoft.TeamFoundation.Git.Server.GitArgumentException, Microsoft.TeamFoundation.Git.Server',
    typeKey: 'GitArgumentException',
    errorCode: 0,
    eventId: 3000
  },
  responseHeaders: {
    'cache-control': 'no-cache',
    pragma: 'no-cache',
    'content-length': '253',
    'content-type': 'application/json; charset=utf-8',
    expires: '-1',
    p3p: 'CP="CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"',
    'x-tfs-processid': '3ac0a7e9-ec7b-4051-8981-9090c405eb03',
    'strict-transport-security': 'max-age=31536000; includeSubDomains',
    activityid: '81dcb84d-2e07-40f1-ba57-99e331e28596',
    'x-tfs-session': '81dcb84d-2e07-40f1-ba57-99e331e28596',
    'x-vss-e2eid': '81dcb84d-2e07-40f1-ba57-99e331e28596',
    'x-vss-senderdeploymentid': 'e3b46be9-fd8c-bada-74e4-ce06f10dcc5d',
    'x-vss-userdata': '5d1dc7d6-9192-4383-8a4c-95fac49f1498:90a55fa5-d149-4df8-bca9-34bbfad2bd50',
    'x-frame-options': 'SAMEORIGIN',
    'request-context': 'appId=cid-v1:f0601cad-6271-4f14-ae54-9c8a0b5e0b9c',
    'access-control-expose-headers': 'Request-Context',
    'x-content-type-options': 'nosniff',
    'x-cache': 'CONFIG_NOCACHE',
    'x-msedge-ref': 'Ref A: 3F23DF011E2741EFAAE2BB70B93E20AD Ref B: DM2EDGE0917 Ref C: 2024-09-30T07:55:58Z',
    date: 'Mon, 30 Sep 2024 07:55:58 GMT',
    connection: 'close'
  }

Extension (please complete the following information):

  • Host: Azure DevOps
  • Version 1.35.2.947
@philipp-naused
Copy link
Author

I tried setting the value explicitly to 'squash', but it's still trying to complete the PRs with noFastForward.

@philipp-naused philipp-naused changed the title The default value for mergeStrategy is set wrong. mergeStrategy is not working Sep 30, 2024
@philipp-naused philipp-naused changed the title mergeStrategy is not working mergeStrategy parameter is not working Sep 30, 2024
@rhyskoedijk
Copy link
Contributor

Thanks for the report, this will be fixed in #1376.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants