Files
default/scripts/helpers/integration_path.py
Joakim Sørensen 9e8788c060 Add preflight (#490)
* Add preflight

* fix syntax

* move check

* get event

* print

* return event

* use path

* tt

* move to helper

* add issue_comment

* remove should run

* check owner

* add more information to the logs

* test

* add finished

* move keys

* Update errors

* remove repo

* fix JQ run

* filter
2020-05-28 16:53:45 +02:00

19 lines
399 B
Python

import json
import os
from glob import glob
def get_integration_path():
files = []
for dir, _, _ in os.walk("/tmp/repositories/addition"):
files.extend(glob(os.path.join(dir, "*manifest.json")))
if len(files) != 1:
print("No manifest")
exit(1)
return files.pop().replace("/manifest.json", "")
if __name__ == "__main__":
print(get_integration_path())