简体   繁体   English

有没有办法从CLI或Groovy中以编程方式从JIRA中提取冲刺编号?

[英]Is there a way to programatically pull the sprint number from JIRA from CLI or Groovy?

I want to automate our build so that we usually don't have to fiddle with our versions. 我想自动化我们的构建,以便我们通常不必摆弄我们的版本。 Our versions follow the format: 我们的版本遵循以下格式:

${YY}.${Quarter}.${Sprint}.${patch}

Seems like I should be able to reach out to JIRA and grab that sprint number. 看来我应该可以联系JIRA并获取那个冲刺编号。

Jira has a REST API that also exposes board and sprint info. Jira具有一个REST API,该API也可以显示木板和冲刺信息。

Ie. 就是 GET /rest/agile/1.0/board/{boardId}/sprint GET /rest/agile/1.0/board/{boardId}/sprint

You can also add the state query parameter to only get the active sprint as mentioned in the docs . 您还可以添加状态查询参数,以仅获取文档中提到的活动 sprint。

It frequently happens that buildscripts also need info from commit messages or from jira issues for which code changes were made. 经常发生的情况是,构建脚本还需要来自提交消息或进行了代码更改的jira问题中的信息。 All of these are accessible through apis like git cli, bitbucket/jira rest api, ... 所有这些都可以通过git cli,bitbucket / jira rest api等API进行访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM