-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: auto-create data drift issue (fix #5)
- Loading branch information
Showing
4 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,19 +174,19 @@ def open_github_issue(issue_title, issue_body, labels=None): | |
url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/issues" | ||
|
||
headers = { | ||
"Authorization": f"token {token}", | ||
"Accept": "application/vnd.github.v3+json", | ||
"Authorization": f"Bearer {token}", | ||
"Accept": "application/vnd.github+json", | ||
"X-GitHub-Api-Version": "2022-11-28", | ||
} | ||
|
||
data = {"title": issue_title, "body": issue_body, "labels": labels} | ||
|
||
response = requests.post(url, headers=headers, json=data) | ||
if response.status_code == 201: | ||
issue_url = response.json()["html_url"] | ||
print(f"GitHub issue created: {issue_url}") | ||
return issue_url | ||
else: | ||
print(f"Failed to create GitHub issue: {response.content}") | ||
raise RuntimeError(f"Failed to create GitHub issue: {response.content}") | ||
return None | ||
|
||
|
||
|
@@ -208,7 +208,7 @@ def get_github_repo_info(): | |
pattern = r"[email protected]:(.+)/(.+)\.git" | ||
elif remote_url.startswith("https://"): | ||
# HTTPS URL | ||
pattern = r"https://github.com/(.+)/(.+)\.git" | ||
pattern = r"https://github.com/(.+)/(.+)" | ||
else: | ||
# Other formats | ||
return None, None | ||
|