// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`modules/platform/azure/index > createPr() > should create and return a PR object 1`] = `
{
  "bodyStruct": {
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  },
  "createdAt": undefined,
  "number": 456,
  "pullRequestId": 456,
  "sourceBranch": undefined,
  "sourceRefName": undefined,
  "state": "open",
  "targetBranch": undefined,
}
`;

exports[`modules/platform/azure/index > createPr() > should create and return a PR object from base branch 1`] = `
{
  "bodyStruct": {
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  },
  "createdAt": undefined,
  "number": 456,
  "pullRequestId": 456,
  "sourceBranch": undefined,
  "sourceRefName": undefined,
  "state": "open",
  "targetBranch": undefined,
}
`;

exports[`modules/platform/azure/index > createPr() > should create and return an approved PR object 1`] = `
{
  "bodyStruct": {
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  },
  "createdAt": undefined,
  "createdBy": {
    "id": 123,
    "url": "user-url",
  },
  "number": 456,
  "pullRequestId": 456,
  "sourceBranch": undefined,
  "sourceRefName": undefined,
  "state": "open",
  "targetBranch": undefined,
}
`;

exports[`modules/platform/azure/index > createPr() > when usePlatformAutomerge is set > should create and return a PR object with auto-complete set 1`] = `
{
  "autoCompleteSetBy": {
    "id": "123",
  },
  "bodyStruct": {
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  },
  "completionOptions": {
    "deleteSourceBranch": true,
    "mergeCommitMessage": "The Title",
    "mergeStrategy": 2,
  },
  "createdAt": undefined,
  "createdBy": {
    "id": "123",
  },
  "number": 456,
  "pullRequestId": 456,
  "sourceBranch": undefined,
  "sourceRefName": undefined,
  "state": "open",
  "targetBranch": undefined,
  "title": "The Title",
}
`;

exports[`modules/platform/azure/index > deleteLabel() > Should delete a label 1`] = `
[
  [],
  [],
]
`;

exports[`modules/platform/azure/index > ensureComment > adds comment if missing 1`] = `
[
  [
    {
      "comments": [
        {
          "commentType": 1,
          "content": "### some-subject

some
content",
          "parentCommentId": 0,
        },
      ],
      "status": 1,
    },
    "1",
    42,
  ],
]
`;

exports[`modules/platform/azure/index > ensureComment > adds comment if missing 2`] = `[]`;

exports[`modules/platform/azure/index > ensureComment > does nothing if comment exists and is the same 1`] = `[]`;

exports[`modules/platform/azure/index > ensureComment > does nothing if comment exists and is the same 2`] = `[]`;

exports[`modules/platform/azure/index > ensureComment > does nothing if comment exists and is the same when there is no topic 1`] = `[]`;

exports[`modules/platform/azure/index > ensureComment > does nothing if comment exists and is the same when there is no topic 2`] = `[]`;

exports[`modules/platform/azure/index > ensureComment > updates comment if missing 1`] = `[]`;

exports[`modules/platform/azure/index > ensureComment > updates comment if missing 2`] = `
[
  [
    {
      "content": "### some-subject

some
new
content",
    },
    "1",
    42,
    4,
    2,
  ],
]
`;

exports[`modules/platform/azure/index > getJsonFile() > supports fetch from another repo 1`] = `
[
  [
    "123456",
    "file.json",
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    undefined,
    true,
  ],
]
`;

exports[`modules/platform/azure/index > getPr(prNo) > should return a pr in the right format 1`] = `
{
  "bodyStruct": {
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  },
  "createdAt": undefined,
  "labels": [
    "renovate",
  ],
  "number": 1234,
  "pullRequestId": 1234,
  "sourceBranch": undefined,
  "sourceRefName": undefined,
  "state": "open",
  "targetBranch": undefined,
}
`;

exports[`modules/platform/azure/index > getRepos() > should return an array of repos 1`] = `
[
  [],
]
`;

exports[`modules/platform/azure/index > getRepos() > should return an array of repos 2`] = `
[
  "prj1/repo1",
  "prj1/repo2",
]
`;

exports[`modules/platform/azure/index > initPlatform() > should init 1`] = `
{
  "endpoint": "https://dev.azure.com/renovate12345/",
}
`;

exports[`modules/platform/azure/index > initRepo > should initialise the config for a repo 1`] = `
[
  [],
]
`;

exports[`modules/platform/azure/index > initRepo > should initialise the config for a repo 2`] = `
{
  "defaultBranch": "defBr",
  "isFork": false,
  "repoFingerprint": "02574de485149547c1a071aa7921da3d0afadcd6162f3bd49ba3ced29be589f8b9bac689fd0badb212bd21c3f48bd8566beaf31cdca2b083bd855808a9c129e2",
}
`;

exports[`modules/platform/azure/index > updatePr(prNo, title, body, platformPrOptions) > should close the PR 1`] = `
[
  [
    {
      "description": "Hello world again",
      "status": 2,
      "title": "The New Title",
    },
    "1",
    1234,
  ],
]
`;

exports[`modules/platform/azure/index > updatePr(prNo, title, body, platformPrOptions) > should re-approve the PR 1`] = `undefined`;

exports[`modules/platform/azure/index > updatePr(prNo, title, body, platformPrOptions) > should reopen the PR 1`] = `
[
  [
    {
      "status": 1,
    },
    "1",
    1234,
  ],
  [
    {
      "description": "Hello world again",
      "title": "The New Title",
    },
    "1",
    1234,
  ],
]
`;

exports[`modules/platform/azure/index > updatePr(prNo, title, body, platformPrOptions) > should update the PR 1`] = `
[
  [
    {
      "description": "Hello world again",
      "targetRefName": "refs/heads/new_base",
      "title": "The New Title",
    },
    "1",
    1234,
  ],
]
`;

exports[`modules/platform/azure/index > updatePr(prNo, title, body, platformPrOptions) > should update the PR without description 1`] = `
[
  [
    {
      "title": "The New Title - autoclose",
    },
    "1",
    1234,
  ],
]
`;
