(task, build, onDone, commandArgsRaw, isPrerelease, tagName, draftOnly)
| 1939 | } |
| 1940 | |
| 1941 | function uploadToGithub (task, build, onDone, commandArgsRaw, isPrerelease, tagName, draftOnly) { |
| 1942 | const versionName = settings.app.name + ' ' + |
| 1943 | build.version.name + |
| 1944 | (isPrerelease ? ' ' + build.githubTrack : ''); |
| 1945 | |
| 1946 | let changeLog = '**' + settings.app.name + '** `' + versionName + '` has been released.'; |
| 1947 | const fromToCommit = getFromToCommit(build, true); |
| 1948 | if (fromToCommit) { |
| 1949 | const changesUrl = build.git.remoteUrl + '/compare/' + fromToCommit.commit_range; |
| 1950 | changeLog += ' You can review all changes in the source code [here](' + changesUrl + ').' |
| 1951 | } |
| 1952 | changeLog += '\n\n'; |
| 1953 | |
| 1954 | if (build.pullRequestsMetadata || !empty(build.pullRequests)) { |
| 1955 | changeLog += '### Pull requests\n\n'; |
| 1956 | changeLog += 'This version includes the following unmerged pull requests. Review the source code changes separately:'; |
| 1957 | changeLog += '\n\n'; |
| 1958 | |
| 1959 | changeLog += toDisplayPullRequestList(build, true); |
| 1960 | changeLog += '\n\n'; |
| 1961 | } |
| 1962 | |
| 1963 | if (commandArgsRaw) { |
| 1964 | changeLog += '## Changes\n'; |
| 1965 | changeLog += commandArgsRaw.trim() + '\n\n'; |
| 1966 | } |
| 1967 | |
| 1968 | changeLog += '## Download\n'; |
| 1969 | ALL_PLATFORMS.forEach((platform) => { |
| 1970 | const track = build[platform + 'Track']; |
| 1971 | if (track || platform === 'telegram') { |
| 1972 | changeLog += '\n* '; |
| 1973 | switch (platform) { |
| 1974 | case 'googlePlay': { |
| 1975 | changeLog += '**[Google Play](' + settings.app.market_url.google + ')**'; |
| 1976 | changeLog += ' ([subscribe to beta](' + settings.url.testing + '))'; |
| 1977 | break; |
| 1978 | } |
| 1979 | case 'huawei': { |
| 1980 | changeLog += '**[Huawei AppGallery](' + settings.app.market_url.huawei + ')**'; |
| 1981 | break; |
| 1982 | } |
| 1983 | case 'github': { |
| 1984 | changeLog += '**[GitHub Releases](' + build.git.remoteUrl + '/releases)**'; |
| 1985 | break; |
| 1986 | } |
| 1987 | case 'telegram': { |
| 1988 | changeLog += '**[Telegram X APKs & Build Info](https://t.me/tgx_log)**'; |
| 1989 | break; |
| 1990 | } |
| 1991 | } |
| 1992 | } |
| 1993 | }); |
| 1994 | changeLog += '\n\n'; |
| 1995 | |
| 1996 | changeLog += '## Checksums\n\n'; |
| 1997 | changeLog += 'You can always check if checksum of an APK you downloaded corresponds to any official Telegram X build via [@tgx_bot](https://t.me/tgx_bot).\n\n'; |
| 1998 |
no test coverage detected