diff --git a/.gitignore b/.gitignore index aa5609b..2734678 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ organised_for_processing.txt validated.txt output.txt output +*.sh # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/README.md b/README.md index 04331e9..eeb1b1a 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,12 @@ Parses PDF schedule cards, extracting PIS codes and headcodes before using the OwlBoard API to build a list of PIS codes. Submitting the completed list to Git. -Interacts with OwlBoard API using pyOwlBoard \ No newline at end of file +Interacts with OwlBoard API using pyOwlBoard + +## Environment Variables + +The following environment variables should be set: + +GITEA_USER - Not Required? +GITEA_PASS - Gitea API Key +OWLBOARD_KEY - API Key (uuid) for OwlBoard. Only required if authentication is enabled \ No newline at end of file diff --git a/src/gitea.py b/src/gitea.py index 68a07e3..5298e80 100644 --- a/src/gitea.py +++ b/src/gitea.py @@ -23,9 +23,10 @@ class GiteaConnector: "title": title, "body": content, "assignees": ["fred.boniface"], - "labels": ["bug", "urgent"], + "labels": [261], } + print(f"URL: {url}") response = requests.post(url, headers=self.header, json=issue_data) if response.status_code == 201: print("Succesfully creates issue: ", response.json()) diff --git a/src/validate.py b/src/validate.py index 1d4e5c9..5f92e85 100644 --- a/src/validate.py +++ b/src/validate.py @@ -34,7 +34,7 @@ def filter_timetable_entries(diagram_entries): ## Checks OwlBoard API for existing PIS codes and whether they match def check_and_validate_against_owlboard(train_entries): ob_client = client.OwlBoardClient("https://owlboard.info", os.getenv("OWLBOARD_KEY")) - gitea_client = GiteaConnector("https://git.fjla.uk/api/v1/repos/owlboard/data", "fred.boniface", os.getenv("GITEA_PASS")) + gitea_client = GiteaConnector("https://git.fjla.uk/api/v1/repos/owlboard/data/", "fred.boniface", os.getenv("GITEA_PASS")) output = [] for train_entry in train_entries: