Files
default/scripts/changed/repo.py
T
Joakim Sørensen 001a81b77f New Github actions (#481)
* Test new check

* Add quote

* test

* test

* move check

* move back

* use env

* test multistep

* test trigger

* if: github.event.label.name

* quotes

* hassfest?

* Fix clone

* Update hassfest

* check hassfest

* Use real domain

* Lmit

* Test hassfest

* Check domain

* Fix domain

* No changes

* Enable on unlable

* Change HACS validate

* Move inputs

* Add dummy integration

* TEst

* Move to env

* Fix repo

* Remove entry
2020-05-26 17:53:04 +02:00

28 lines
544 B
Python

import json
from scripts.changed.category import get_category
DEFAULT = "/tmp/default"
def get_repo():
category = get_category()
with open(f"{DEFAULT}/{category}", "r") as default:
current = json.loads(default.read())
with open(category, "r") as default:
new = json.loads(default.read())
for repo in current:
if repo in new:
new.remove(repo)
if len(new) != 1:
print(f"Bad data {new}")
exit(1)
return new.pop()
if __name__ == "__main__":
print(get_repo())