json - 有没有办法将分支合并状态信息转换为 JSON?
问题描述
因此,流量大的存储库总是倾向于拥有越来越多的 OPEN、MERGED 和 DECLINED 分支。我们提出了创建一个 Jenkins 作业的想法,该作业可以不时运行以删除开发人员所有已合并和未使用的分支。
生成的 JSON 文件不包含 BRANCH STATUS 的信息。那么有没有办法我可以获得这样的信息,在 isDefault 参数之后的附加键值对就像......
“branchStatus”:已合并/已拒绝/已打开。
{
"size": 312,
"limit": 500,
"isLastPage": true,
"values": [
{
"id": "refs/heads/ODC-2843-DC-Scheduler-Service",
"displayId": "ODC-2843-DC-Scheduler-Service",
"type": "BRANCH",
"latestCommit": "fcb1cd0fec34c3ab7d9539e23e9cefc1b5c5866e",
"latestChangeset": "fcb1cd0fec34c3ab7d9539e23e9cefc1b5c5866e",
"isDefault": false
},
{
"id": "refs/heads/master",
"displayId": "master",
"type": "BRANCH",
"latestCommit": "fe3d3c678adb7d1f6c472002ef88dafca3295089",
"latestChangeset": "fe3d3c678adb7d1f6c472002ef88dafca3295089",
"isDefault": true
},
}
解决方案
推荐阅读
- grails - 创建名为 samlAuthenticationProvider 的 bean 时出错?
- python - 在 JSON 中转换 Python 列表
- java - 如何使用 querydsl 获取子字段?
- apache-spark - Spark Streaming 窗口使用
- python - gmpy2中如何准确判断一个mpfr数是否为整数?
- django - 我无法在 django 视图中作为组织登录
- javascript - 如何在 AJAX 函数完全执行之前修复 jQuery Promise .then() 被调用?
- sharepoint - 文档级别的共享点权限?可能是个愚蠢的问题
- python - 读一个“。” 分隔文件并使用 python 创建 SQL 查询
- python - 列值不在 padas 数据框中的索引中