Files
Pheenoh c8bb857b13 Assignees (#1876)
* checkpoint

* finish adding assignee support

* test

* use test command

* use test command

* skip build check

* add state to common options, move version check

* cleanup ok-check

* undo dylink change
2023-08-11 00:51:32 -06:00

22 lines
551 B
Python

import yaml, pathlib, os
class StateFile:
data = None
file_name = None
@classmethod
def load(self, file_name: pathlib.Path):
if not os.path.exists(file_name):
default_payload = {
"issues": [],
"labels": [],
"projects": []
}
with open(file_name, 'w') as f:
yaml.dump(default_payload, f)
self.file_name = file_name
with open(file_name, 'r') as f:
self.data = yaml.safe_load(f)