Complete gitea issue creation API function
This commit is contained in:
parent
8e78319cbd
commit
fb7eb20c98
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ organised_for_processing.txt
|
||||
validated.txt
|
||||
output.txt
|
||||
output
|
||||
*.sh
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
10
README.md
10
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
|
||||
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
|
@ -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())
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user