mirror of
https://github.com/zeldaret/tp
synced 2026-09-01 17:49:58 -04:00
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
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
import yaml, pathlib
|
||||
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)
|
||||
Reference in New Issue
Block a user