forked from importers/git-importer
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
44b4d690db | ||
|
a69e861614 | ||
|
1da740bd8b | ||
|
b3107ba3bf |
@ -251,7 +251,7 @@ class Git:
|
|||||||
|
|
||||||
def add_gitea_remote(self, package):
|
def add_gitea_remote(self, package):
|
||||||
repo_name = package.replace("+", "_")
|
repo_name = package.replace("+", "_")
|
||||||
org_name = "rpm"
|
org_name = "pool"
|
||||||
|
|
||||||
if not os.getenv("GITEA_TOKEN"):
|
if not os.getenv("GITEA_TOKEN"):
|
||||||
logging.warning("Not adding a remote due to missing $GITEA_TOKEN")
|
logging.warning("Not adding a remote due to missing $GITEA_TOKEN")
|
||||||
|
@ -268,9 +268,12 @@ class Importer:
|
|||||||
return self.scmsync_cache[key]
|
return self.scmsync_cache[key]
|
||||||
|
|
||||||
root = self.obs._meta(key)
|
root = self.obs._meta(key)
|
||||||
|
scmsync = None
|
||||||
scmsync_exists = False
|
scmsync_exists = False
|
||||||
if root is not None:
|
if root and root.find('scmsync') is not None:
|
||||||
scmsync_exists = root.find('scmsync') is not None
|
scmsync = root.find('scmsync').text
|
||||||
|
if scmsync:
|
||||||
|
scmsync_exists = scmsync.startswith('https://src.opensuse.org/pool/')
|
||||||
self.scmsync_cache[key] = scmsync_exists
|
self.scmsync_cache[key] = scmsync_exists
|
||||||
return scmsync_exists
|
return scmsync_exists
|
||||||
|
|
||||||
|
@ -36,10 +36,12 @@ def listen_events():
|
|||||||
and "package" in body
|
and "package" in body
|
||||||
and body["project"] == "openSUSE:Factory"
|
and body["project"] == "openSUSE:Factory"
|
||||||
):
|
):
|
||||||
if "/" in body["package"]:
|
# Strip multibuild flavors
|
||||||
|
package = body["package"].partition(':')[0]
|
||||||
|
if "/" in package:
|
||||||
return
|
return
|
||||||
|
|
||||||
(MY_TASKS_DIR / body["package"]).touch()
|
(MY_TASKS_DIR / package).touch()
|
||||||
print(" [x] %r:%r" % (method.routing_key, body["package"]))
|
print(" [x] %r:%r" % (method.routing_key, body["package"]))
|
||||||
|
|
||||||
channel.basic_consume(queue_name, callback, auto_ack=True)
|
channel.basic_consume(queue_name, callback, auto_ack=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user