-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1259 from novasamatech/rc/7.5.0
Rc/7.5.0
- Loading branch information
Showing
391 changed files
with
2,919 additions
and
1,226 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import requests | ||
import sys | ||
import os | ||
from datetime import datetime | ||
|
||
|
||
def parse_base_params(comment_link): | ||
response = requests.get(comment_link).json() | ||
try: | ||
lines = response["body"].split("\n") | ||
except: | ||
print("Please, create a comment with 'Release severity: Major | Critical | Normal' and 'Release notes:'") | ||
exit(1) | ||
|
||
time = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ') | ||
severity = next((s.split(': ')[1] for s in lines if s.startswith('Release severity: ')), '').strip() | ||
|
||
if not time or not severity: | ||
print(f"Current values: Time - '{time}', Severity - '{severity}'") | ||
print("Time or severity cannot be empty, please set it in the PR comment with lines 'Release time:' and 'Release severity:'") | ||
sys.exit(1) | ||
|
||
with open(os.getenv('GITHUB_ENV'), 'a') as f: | ||
f.write(f'TIME={time}\n') | ||
f.write(f'SEVERITY={severity}\n') | ||
parse_base_params(os.getenv("COMMENT_LINK")) |
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
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
Oops, something went wrong.