(build, allowProduction)
| 849 | } |
| 850 | |
| 851 | function getFromToCommit (build, allowProduction) { |
| 852 | if (build.outputApplication && build.outputApplication.isPRBuild) |
| 853 | return null; |
| 854 | if (build.googlePlayTrack) { |
| 855 | let googlePlayBuild = allowProduction ? build.previousGooglePlayProductionBuild : null; |
| 856 | if (!(googlePlayBuild && |
| 857 | compareRemoteUrls(googlePlayBuild.remoteUrl, build.git.remoteUrl) && |
| 858 | googlePlayBuild.branch === build.git.branch)) { |
| 859 | googlePlayBuild = build.previousGooglePlayBuild; |
| 860 | } |
| 861 | if (googlePlayBuild && |
| 862 | compareRemoteUrls(googlePlayBuild.remoteUrl, build.git.remoteUrl) && |
| 863 | googlePlayBuild.branch === build.git.branch) { |
| 864 | return { |
| 865 | commit_range: googlePlayBuild.commit.short + '...' + build.git.commit.short, |
| 866 | from_version: googlePlayBuild.version, |
| 867 | build_information: googlePlayBuild |
| 868 | }; |
| 869 | } |
| 870 | } else if (build.telegramTrack) { |
| 871 | const telegramBuild = build.previousTelegramBuild; |
| 872 | if (telegramBuild && |
| 873 | compareRemoteUrls(telegramBuild.remoteUrl, build.git.remoteUrl) && |
| 874 | telegramBuild.branch === build.git.branch) { |
| 875 | return { |
| 876 | commit_range: telegramBuild.commit.short + '...' + build.git.commit.short, |
| 877 | from_version: telegramBuild.version, |
| 878 | build_information: telegramBuild |
| 879 | }; |
| 880 | } |
| 881 | } |
| 882 | return null; |
| 883 | } |
| 884 | |
| 885 | function getBuildCaption (build, sdkVariant, abiVariant, isPrivate, shortenChecksums) { |
| 886 | const fromToCommit = getFromToCommit(build, |
no test coverage detected