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

Azure DevOps REST API - broken example and missing documentation in Configurations - Create #713

Open
ruijarimba opened this issue Jul 13, 2024 · 1 comment

Comments

@ruijarimba
Copy link

The Merge strategy policy example is broken.

POST https://dev.azure.com/fabrikam/fabrikam-fiber-git/_apis/policy/configurations?api-version=7.0

{
  "isEnabled": true,
  "isBlocking": true,
  "type": {
    "id": "fa4e907d-c16b-4a4c-9dfa-4916e5d171ab"
  },
  "settings": {
    "useSquashMerge": true,
    "scope": [
      {
        "repositoryId": "1d1dad71-f27c-4370-810d-838ec41efd41",
        "refName": "refs/heads/master",
        "matchKind": "exact"
      }
    ]
  }
}

useSquashMerge setting doesn't work in Azure DevOps Services (see SO issue), allowSquash should be used instead.

Also, I had to do a Google search in order to find the right settings for the Merge strategy policy:

  • useSquashMerge
  • allowNoFastForward
  • allowSquash
  • allowRebase
  • allowRebaseMerge

These settings should be properly documented in the page. It would be great if the sample request listed above could include these settings as well.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@Kanahowl
Copy link

Thank you for your message, you helped me a lot.. didn't get why it wasn't working before.
The keys were just not the right ones to use.

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

No branches or pull requests

2 participants