Commit 055c0baf authored by Vitaly Lipatov's avatar Vitaly Lipatov

gitask ls: extract package name from dir path when pkgname is missing

parent a44373ef
...@@ -205,6 +205,11 @@ for i, t in enumerate(tasks): ...@@ -205,6 +205,11 @@ for i, t in enumerate(tasks):
pkg = st.get("pkgname", "") pkg = st.get("pkgname", "")
tag = st.get("tag_name", "") tag = st.get("tag_name", "")
stype = st.get("type", "repo") stype = st.get("type", "repo")
# fallback: extract package name from dir path
if not pkg:
d = st.get("dir", "")
if d:
pkg = d.rstrip("/").rsplit("/", 1)[-1].removesuffix(".git")
if stype == "delete": if stype == "delete":
pkgs.append("(delete {})".format(pkg)) pkgs.append("(delete {})".format(pkg))
elif pkg and tag: elif pkg and tag:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment