fix: removed git checkout (was destructive)
- Remove git init/fetch/checkout from utils/misc.py - Hardcode userbot_version to 2.5.0
This commit is contained in:
+14
-14
@@ -59,26 +59,26 @@ async def version(client: Client, message: Message):
|
||||
|
||||
await message.delete()
|
||||
|
||||
remote_url = list(gitrepo.remote().urls)[0]
|
||||
commit_time = (
|
||||
datetime.datetime.fromtimestamp(gitrepo.head.commit.committed_date)
|
||||
.astimezone(datetime.timezone.utc)
|
||||
.strftime("%Y-%m-%d %H:%M:%S %Z")
|
||||
)
|
||||
if gitrepo is not None:
|
||||
remote_url = list(gitrepo.remote().urls)[0]
|
||||
commit_time = (
|
||||
datetime.datetime.fromtimestamp(gitrepo.head.commit.committed_date)
|
||||
.astimezone(datetime.timezone.utc)
|
||||
.strftime("%Y-%m-%d %H:%M:%S %Z")
|
||||
)
|
||||
git_info = (
|
||||
f"\n<b>Branch: <a href={remote_url}/tree/{gitrepo.active_branch}>{gitrepo.active_branch}</a>\n"
|
||||
if gitrepo.active_branch != "master" else "\n"
|
||||
) + f"Commit: <a href={remote_url}/commit/{gitrepo.head.commit.hexsha}>" f"{gitrepo.head.commit.hexsha[:7]}</a> by {gitrepo.head.commit.author.name}\n" f"Commit time: {commit_time}</b>"
|
||||
else:
|
||||
git_info = ""
|
||||
|
||||
await message.reply(
|
||||
f"<b>Moon Userbot version: {userbot_version}\n"
|
||||
f"Changelog </b><i><a href=https://t.me/moonuserbot/{changelog}>in channel</a></i>.<b>\n"
|
||||
f"Changelog written by </b><i>"
|
||||
f"<a href=https://t.me/Qbtaumai>Abhi</a></i>\n\n"
|
||||
+ (
|
||||
f"<b>Branch: <a href={remote_url}/tree/{gitrepo.active_branch}>{gitrepo.active_branch}</a>\n"
|
||||
if gitrepo.active_branch != "master"
|
||||
else ""
|
||||
)
|
||||
+ f"Commit: <a href={remote_url}/commit/{gitrepo.head.commit.hexsha}>"
|
||||
f"{gitrepo.head.commit.hexsha[:7]}</a> by {gitrepo.head.commit.author.name}\n"
|
||||
f"Commit time: {commit_time}</b>",
|
||||
f"{git_info}",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user