Open bitsydoge opened 4 years ago
I have looked into this and it seems if you add HTTPS:// before the link it will not show in the tweet but it will also not create a body text! Let me know if this works for you.
For example: Google.com will create a preview but https://google.com will not.
I had https in the link since the start :/ https://twitter.com/GodotCommits
Do you mind posting a snippet of the code?
Ahhh I see. So for Google.com it fixes it. For youtube.com there is never a preview and for Github it does not. I will continue to look into this.
Yeah no prob here a "simplified" version
def format_commit_message(commits):
return commits.message + " " if len(commits.message) < 200 else commits.message[0:200] + " ... "
api.PostUpdate(format_commit_message(commits) + repo.remotes.origin.url + "/commit/" + commits.hexsha)
# repo.remotes.origin.url = https://github.com/godotengine/godot
# if config.log:
## Log
print("------------------------------------")
print(format_commit_message(commits))
print("URL : " + repo.remotes.origin.url + "/commit/" + commits.hexsha)
# Example log output
# Add WebSocket debugger, use it for Javascript.
#
# URL : https://github.com/godotengine/godot/commit/3097c2da963fe355c81816a74824170b6dce697c
Hello
I have a bot that tweet commits from a github git with the commit message and a link to the commit. But there is the annoying preview and I can't find how to remove it. Any idea and way of doing it ?
Thank's