mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-07 12:47:32 -05:00
update_flake_lock.py: skip if not github
This commit is contained in:
8
.github/workflows/update_flake_lock.py
vendored
8
.github/workflows/update_flake_lock.py
vendored
@ -38,6 +38,10 @@ class FlakeLock:
|
||||
def inputs(self):
|
||||
return self._lock["nodes"]["root"]["inputs"]
|
||||
|
||||
def is_github(self, flake_input):
|
||||
n = self._lock["nodes"][flake_input]
|
||||
return n.type == "github";
|
||||
|
||||
def get_input(self, flake_input):
|
||||
n = self._lock["nodes"][flake_input]
|
||||
repo_id = f"{n['locked']['owner']}/{n['locked']['repo']}"
|
||||
@ -131,6 +135,10 @@ def main():
|
||||
for l in diff:
|
||||
print(l, end="")
|
||||
|
||||
if not lock.is_github(flake_input):
|
||||
print(f"[{flake_input}] Non-github repositories unsupported")
|
||||
continue
|
||||
|
||||
old = lock.get_input(flake_input)
|
||||
new = FlakeLock(github, updated_lock_contents).get_input(flake_input)
|
||||
|
||||
|
Reference in New Issue
Block a user