Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Build) Fixed Windows and Linux builds.
#SR_CLOSE(64, 62, 56)
- Loading branch information
1 parent
59c318a
commit 4fca16a
Showing
5 changed files
with
74 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
try: | ||
import os | ||
import re | ||
from github import Github | ||
from github import Auth | ||
except ImportError: | ||
print("Import exception occurred!") | ||
exit(-1) | ||
|
||
commitMessage = os.getenv('commitMessage') | ||
commitSha = os.getenv('commitSha') | ||
token = os.getenv('ciToken') | ||
|
||
try: | ||
print("Trying to login to GitHub and get the repository") | ||
auth = Auth.Token(token) | ||
g = Github(auth=auth) | ||
repo = g.get_repo("SpaRcle-Studio/SREngine") | ||
except Exception as e: | ||
print(f"GitHub login exception occurred: {str(e)}") | ||
exit(-1) | ||
|
||
print(f"Commit message:\n{commitMessage}\n") | ||
try: | ||
regexClose = re.search('#SR_CLOSE(.*)', commitMessage) | ||
closeMacros = regexClose.group(1) | ||
closeMacros = closeMacros[1:][:-1] | ||
closeMacros = closeMacros.replace(' ', '') | ||
issueIds = closeMacros.split(",") | ||
print(f"Issue Ids are: {issueIds}") | ||
except Exception as e: | ||
print(f"Regex error occurred: {str(e)}") | ||
exit(-1) | ||
|
||
for issueId in issueIds: | ||
try: | ||
print(f"Trying to get issue: {issueId}") | ||
issue = repo.get_issue(int(issueId)) | ||
print(f"Creating comment and closing issue: {issueId}") | ||
issue.create_comment(f"Issue is closed automatically by CI. Commit: {commitSha}") | ||
issue.edit(state='closed') | ||
print(f"Success for issue: {issueId}") | ||
except Exception as e: | ||
print(f"Issue managing exception occurred: {str(e)}") | ||
print(f"Script execution is finished.") |
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
7 changes: 6 additions & 1 deletion
7
Engine/Core/libs/Utils/inc/Utils/Platform/LinuxStacktraceImpl.h
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
#ifndef SRENGINE_LINUXSTACKTRACEIMPL_H | ||
#define SRENGINE_LINUXSTACKTRACEIMPL_H | ||
|
||
#include <Utils/macros.h> | ||
|
||
namespace SR_UTILS_NS { | ||
extern char* GetStacktraceImpl(); | ||
extern void StacktraceInitImpl(); | ||
} | ||
} | ||
|
||
#endif // SRENGINE_LINUXSTACKTRACEIMPL_H |