Compare commits
2 commits
39b38d2ded
...
2ba83ea3fe
Author | SHA1 | Date | |
---|---|---|---|
|
2ba83ea3fe | ||
|
cd6457352b |
2 changed files with 13 additions and 5 deletions
|
@ -1740,11 +1740,15 @@ class ForgejoEngine:
|
|||
"""Integration to Forgejo/Gitea API"""
|
||||
|
||||
def __init__(self):
|
||||
self.api_url = 'https://git.pointer.click'
|
||||
# the api_url may be overwritten by form_repo_url
|
||||
# if updater.host is set
|
||||
self.api_url = 'https://codeberg.org'
|
||||
self.token = None
|
||||
self.name = "forgejo"
|
||||
|
||||
def form_repo_url(self, updater):
|
||||
if updater.host:
|
||||
self.api_url = "https://" + updater.host
|
||||
return "{}/api/v1/repos/{}/{}".format(self.api_url, updater.user, updater.repo)
|
||||
|
||||
def form_tags_url(self, updater):
|
||||
|
@ -1775,7 +1779,7 @@ class ForgejoEngine:
|
|||
return [
|
||||
{
|
||||
"name": tag["name"],
|
||||
"zipball_url": self.get_zip_url(tag["commit"]["id"], updater)
|
||||
"zipball_url": self.get_zip_url(tag["commit"]["sha"], updater)
|
||||
} for tag in response]
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ except Exception as e:
|
|||
# not match and have errors. Must be all lowercase and no spaces! Should also
|
||||
# be unique among any other addons that could exist (using this updater code),
|
||||
# to avoid clashes in operator registration.
|
||||
updater.addon = "addon_updater_demo"
|
||||
updater.addon = "abc3d"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -1346,6 +1346,10 @@ def register(bl_info):
|
|||
# updater.engine = "GitLab"
|
||||
# updater.engine = "Bitbucket"
|
||||
|
||||
# set your host.
|
||||
# only Forgejo. (codeberg.org is default if not specified).
|
||||
updater.host = "git.pointer.click"
|
||||
|
||||
# If using private repository, indicate the token here.
|
||||
# Must be set after assigning the engine.
|
||||
# **WARNING** Depending on the engine, this token can act like a password!!
|
||||
|
@ -1392,7 +1396,7 @@ def register(bl_info):
|
|||
updater.backup_current = True # True by default
|
||||
|
||||
# Sample ignore patterns for when creating backup of current during update.
|
||||
updater.backup_ignore_patterns = ["__pycache__"]
|
||||
updater.backup_ignore_patterns = [".git", "__pycache__", "*.bat", ".gitignore", "*.exe"]
|
||||
# Alternate example patterns:
|
||||
# updater.backup_ignore_patterns = [".git", "__pycache__", "*.bat", ".gitignore", "*.exe"]
|
||||
|
||||
|
@ -1461,7 +1465,7 @@ def register(bl_info):
|
|||
# Note: updater.include_branch_list defaults to ['master'] branch if set to
|
||||
# none. Example targeting another multiple branches allowed to pull from:
|
||||
# updater.include_branch_list = ['master', 'dev']
|
||||
updater.include_branch_list = ['main'] # None is the equivalent = ['master']
|
||||
updater.include_branch_list = ['main', 'dev'] # None is the equivalent = ['master']
|
||||
|
||||
# Only allow manual install, thus prompting the user to open
|
||||
# the addon's web page to download, specifically: updater.website
|
||||
|
|
Loading…
Reference in a new issue