mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-30 11:45:08 +00:00
Added TG for macOS version check to issue closer.
This commit is contained in:
parent
99ccd49e13
commit
919834093e
30
.github/workflows/issue_closer.yml
vendored
30
.github/workflows/issue_closer.yml
vendored
@ -14,6 +14,22 @@ jobs:
|
|||||||
echo $tag
|
echo $tag
|
||||||
echo ::set-env name=LATEST_TAG::$tag
|
echo ::set-env name=LATEST_TAG::$tag
|
||||||
|
|
||||||
|
- name: Get the latest macOS version.
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import subprocess;
|
||||||
|
from xml.dom import minidom;
|
||||||
|
|
||||||
|
url = "https://osx.telegram.org/updates/versions.xml";
|
||||||
|
subprocess.check_call("wget %s" % url, shell=True);
|
||||||
|
|
||||||
|
xmldoc = minidom.parse('versions.xml');
|
||||||
|
itemlist = xmldoc.getElementsByTagName('enclosure');
|
||||||
|
ver = itemlist[0].attributes['sparkle:shortVersionString'].value;
|
||||||
|
print(ver);
|
||||||
|
|
||||||
|
subprocess.check_call("echo ::set-env name=%s::%s" % ("LATEST_MACOS", ver), shell=True);
|
||||||
|
|
||||||
- name: Check a version from an issue.
|
- name: Check a version from an issue.
|
||||||
uses: actions/github-script@0.4.0
|
uses: actions/github-script@0.4.0
|
||||||
with:
|
with:
|
||||||
@ -75,10 +91,20 @@ jobs:
|
|||||||
let issueNum = firstNum(issueVer);
|
let issueNum = firstNum(issueVer);
|
||||||
let latestNum = firstNum(latestVer);
|
let latestNum = firstNum(latestVer);
|
||||||
|
|
||||||
if (issueNum <= latestNum && issueNum < 5) {
|
let macos_ver = process.env.LATEST_MACOS;
|
||||||
|
console.log("Telegram for MacOS version from website: " + macos_ver);
|
||||||
|
|
||||||
|
if (issueNum <= latestNum && issueNum < macos_ver) {
|
||||||
console.log("Seems the version of this issue is fine!");
|
console.log("Seems the version of this issue is fine!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (issueNum > macos_ver) {
|
||||||
|
let message = `Seems like it's neither the Telegram Desktop\
|
||||||
|
nor the Telegram for macOS version.
|
||||||
|
`;
|
||||||
|
console.log(message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let message = `
|
let message = `
|
||||||
Sorry, but according to the version you specify in this issue, \
|
Sorry, but according to the version you specify in this issue, \
|
||||||
@ -87,7 +113,7 @@ jobs:
|
|||||||
You can report your issue to [the group](https://t.me/macswift) \
|
You can report your issue to [the group](https://t.me/macswift) \
|
||||||
or to [the repository of Telegram for macOS](https://github.com/overtake/TelegramSwift).
|
or to [the repository of Telegram for macOS](https://github.com/overtake/TelegramSwift).
|
||||||
|
|
||||||
If I made a mistake and closed your issue wrongly, please reopen it. Thanks!
|
**If I made a mistake and closed your issue wrongly, please reopen it. Thanks!**
|
||||||
`;
|
`;
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
|
Loading…
Reference in New Issue
Block a user