简体   繁体   English

获取与管道运行相关的提交

[英]Obtain commits associated with pipeline run

In the Azure Pipelines Bun/Run view I can see that the current build is associated with the last N commits: Last 7 commits在 Azure Pipelines Bun/Run 视图中,我可以看到当前构建与最后 N 次提交相关联:最后 7 次提交

This is much more valuable than the Build.SourceVersion pipeline variable for incremental build's sake as I could be able to tell exactly what has changed since the last run.为了增量构建,这比Build.SourceVersion管道变量更有价值,因为我可以准确地知道自上次运行以来发生了什么变化。

I've looked at dev.azure.com/{org}/{project}/_traceability/runview/changes?currentRunId={id} but don't see the commits in there.我查看了dev.azure.com/{org}/{project}/_traceability/runview/changes?currentRunId={id}但没有看到其中的提交。

I've also tried to specify https://dev.azure.com/{org}/{projct}/_apis/build/changes?toBuildId={id} , but without the previous build ID, it errors.我也尝试指定https://dev.azure.com/{org}/{projct}/_apis/build/changes?toBuildId={id} ,但没有以前的构建 ID,它会出错。

Is there a way to easily access which changes this pipeline build is running with?有没有办法轻松访问此管道构建正在运行的更改?

It appears that using the changes API with the same build number as both fromBuildId and toBuildId does just that.似乎使用与fromBuildIdtoBuildId相同的内部版本号的更改 API 就是这样做的。

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

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