{
  "_class" : "hudson.model.FreeStyleBuild",
  "actions" : [
    {
      "_class" : "hudson.model.CauseAction",
      "causes" : [
        {
          "_class" : "com.cloudbees.jenkins.GitHubPushCause",
          "shortDescription" : "Started by GitHub push by ti-chi-bot[bot]"
        },
        {
          "_class" : "com.cloudbees.jenkins.GitHubPushCause",
          "shortDescription" : "Started by GitHub push by ti-chi-bot[bot]"
        }
      ]
    },
    {
      
    },
    {
      "_class" : "jenkins.metrics.impl.TimeInQueueAction",
      "blockedDurationMillis" : 0,
      "blockedTimeMillis" : 0,
      "buildableDurationMillis" : 23252,
      "buildableTimeMillis" : 23252,
      "buildingDurationMillis" : 50221,
      "executingTimeMillis" : 50221,
      "executorUtilization" : 1.0,
      "subTaskCount" : 0,
      "waitingDurationMillis" : 6363,
      "waitingTimeMillis" : 6363
    },
    {
      "_class" : "hudson.plugins.git.util.BuildData",
      "buildsByBranchName" : {
        "origin/main" : {
          "_class" : "hudson.plugins.git.util.Build",
          "buildNumber" : 1459,
          "buildResult" : None,
          "marked" : {
            "SHA1" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
            "branch" : [
              {
                "SHA1" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
                "name" : "origin/main"
              }
            ]
          },
          "revision" : {
            "SHA1" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
            "branch" : [
              {
                "SHA1" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
                "name" : "origin/main"
              }
            ]
          }
        }
      },
      "lastBuiltRevision" : {
        "SHA1" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
        "branch" : [
          {
            "SHA1" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
            "name" : "origin/main"
          }
        ]
      },
      "remoteUrls" : [
        "https://github.com/PingCAP-QE/ci.git"
      ],
      "scmName" : ""
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      "_class" : "org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction"
    }
  ],
  "artifacts" : [
    
  ],
  "building" : False,
  "description" : None,
  "displayName" : "#1459",
  "duration" : 50221,
  "estimatedDuration" : 70196,
  "executor" : None,
  "fullDisplayName" : "seed #1459",
  "id" : "1459",
  "inProgress" : False,
  "keepLog" : False,
  "number" : 1459,
  "queueId" : 3363867,
  "result" : "SUCCESS",
  "timestamp" : 1772610327845,
  "url" : "https://do.pingcap.net/jenkins/job/seed/1459/",
  "builtOn" : "default-935wp",
  "changeSet" : {
    "_class" : "hudson.plugins.git.GitChangeSetList",
    "items" : [
      {
        "_class" : "hudson.plugins.git.GitChangeSet",
        "affectedPaths" : [
          "libraries/tipipeline/vars/prow.groovy"
        ],
        "commitId" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
        "timestamp" : 1772610293000,
        "author" : {
          "absoluteUrl" : "https://do.pingcap.net/jenkins/user/noreply",
          "fullName" : "noreply"
        },
        "authorEmail" : "noreply@github.com",
        "comment" : "refactor(prow): extract _checkoutRefsImpl to deduplicate checkout logic (#4284)\u000a\u000a`checkoutRefs` and `checkoutPrivateRefs` contained an identical ~80-line\u000abash block (git init → fetch → checkout → merge → submodule → gc),\u000adiffering only in remote URL scheme and SSH agent setup.\u000a\u000a## Changes\u000a\u000a- **New `_checkoutRefsImpl(refs, remoteUrl, timeout, withSubmodule)`** —\u000asingle canonical implementation of the shared bash checkout pipeline;\u000acalled by both public functions.\u000a- **`checkoutRefs`** — computes HTTPS remote URL\u000a(`${gitBaseUrl}/${org}/${repo}.git`) and delegates to\u000a`_checkoutRefsImpl`. Signature unchanged.\u000a- **`checkoutPrivateRefs`** — computes SSH remote URL\u000a(`git@${gitSshHost}:${org}/${repo}.git`), retains its `sshagent` wrap\u000aand `ssh-keyscan` step, then delegates to `_checkoutRefsImpl`. Signature\u000aunchanged.\u000a\u000a```groovy\u000adef checkoutRefs(refs, timeout = 5, credentialsId = '', gitBaseUrl = 'https://github.com', withSubmodule = false) {\u000a    final remoteUrl = \"${gitBaseUrl}/${refs.org}/${refs.repo}.git\"\u000a    _checkoutRefsImpl(refs, remoteUrl, timeout, withSubmodule)\u000a}\u000a\u000adef checkoutPrivateRefs(refs, credentialsId, timeout = 5, gitSshHost = 'github.com', withSubmodule = false) {\u000a    final remoteUrl = \"git@${gitSshHost}:${refs.org}/${refs.repo}.git\"\u000a    sshagent(credentials: [credentialsId]) {\u000a        sh label: 'Know hosts', script: \"...\"\u000a        _checkoutRefsImpl(refs, remoteUrl, timeout, withSubmodule)\u000a    }\u000a}\u000a```\u000a\u000aNo behavioral changes — pure deduplication (~94 lines removed).\u000a\u000a<!-- START COPILOT ORIGINAL PROMPT -->\u000a\u000a\u000a\u000a<details>\u000a\u000a<summary>Original prompt</summary>\u000a\u000a> 请在仓库 `PingCAP-QE/ci` 中对 `libraries/tipipeline/vars/prow.groovy`\u000a做一次重构并提交 PR：\u000a> \u000a> 目标：\u000a> - 保持 `checkoutRefs` 与 `checkoutPrivateRefs`\u000a**两个函数的签名完全不变**（参数列表、默认值都不改），以避免调用方需要修改。\u000a> - 将两者内部高度重复的 bash checkout/merge/submodule/gc 逻辑抽取为一个内部实现函数（例如\u000a`_checkoutRefsImpl` 或等价命名），使两者仅在下列差异处保留各自逻辑：\u000a>   1) remote URL 形式：\u000a> - `checkoutRefs` 使用 HTTPS：`${gitBaseUrl}/${refs.org}/${refs.repo}.git`\u000a> - `checkoutPrivateRefs` 使用\u000aSSH：`git@${gitSshHost}:${refs.org}/${refs.repo}.git`\u000a> 2) private checkout 仍需保留 `sshagent(credentials: [credentialsId]) { ...\u000a}` 以及 `ssh-keyscan` 写入 `~/.ssh/known_hosts` 的步骤。\u000a> - 保持原有行为一致（fetch refspec、checkout base_sha、merge pulls SHAs、清理旧 PR\u000arefs、防止缓存 `.git` 膨胀的 maintenance、可选 submodule 更新等），只做抽取和去重。\u000a> \u000a> 实现约束/注意：\u000a> - 不做全局引用搜索，不调整其它文件。\u000a> - 确保 groovy 语法在 Jenkins shared library 环境下可用。\u000a> - 如需要增加新 helper 函数，请以当前文件内 `def` 方式实现。\u000a> - 最终打开一个 PR。\u000a> \u000a> 涉及文件：\u000a> - `libraries/tipipeline/vars/prow.groovy`\u000a> \u000a> 上下文片段（来自讨论线程，仅供参考，不是文件内容）：\u000a> ```groovy\u000a>         _checkoutRefsImpl(refs, remoteUrl, timeout, withSubmodule)\u000a> ```\u000a> \u000a\u000a\u000a</details>\u000a\u000a\u000a\u000a<!-- START COPILOT CODING AGENT SUFFIX -->\u000a\u000a*This pull request was created from Copilot chat.*\u000a>\u000a\u000a<!-- START COPILOT CODING AGENT TIPS -->\u000a---\u000a\u000a\ud83d\udca1 You can make Copilot smarter by setting up custom instructions,\u000acustomizing its development environment and configuring Model Context\u000aProtocol (MCP) servers. Learn more [Copilot coding agent\u000atips](https://gh.io/copilot-coding-agent-tips) in the docs.\u000a\u000a---------\u000a\u000aCo-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>\u000aCo-authored-by: wuhuizuo <2574558+wuhuizuo@users.noreply.github.com>\u000a",
        "date" : "2026-03-04 07:44:53 +0000",
        "id" : "e658c118eaec6e9ff53b8f1ab59fbebb559cc30d",
        "msg" : "refactor(prow): extract _checkoutRefsImpl to deduplicate checkout logic",
        "paths" : [
          {
            "editType" : "edit",
            "file" : "libraries/tipipeline/vars/prow.groovy"
          }
        ]
      }
    ],
    "kind" : "git"
  },
  "culprits" : [
    {
      "absoluteUrl" : "https://do.pingcap.net/jenkins/user/noreply",
      "fullName" : "noreply"
    }
  ]
}