mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
fix missing import
This commit is contained in:
parent
8f7fefb23d
commit
53888bb510
2 changed files with 10 additions and 5 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python requirements
|
||||
run: pip install gitpython semver
|
||||
run: pip install gitpython semver PyGithub
|
||||
|
||||
- name: 💉 Inject new version into files
|
||||
id: version
|
||||
|
|
|
|||
|
|
@ -14,16 +14,21 @@ def get_release_type_github(Log, github_token):
|
|||
g = Github(github_token)
|
||||
repo = g.get_repo("pypeclub/OpenPype")
|
||||
|
||||
labels = set()
|
||||
for line in Log.splitlines():
|
||||
match = re.search("pull request #(\d+)", line)
|
||||
if match:
|
||||
pr_number = match.group(1)
|
||||
pr = repo.get_pull(int(pr_number))
|
||||
for label in pr.labels:
|
||||
if label.name in minor_labels:
|
||||
return ("minor")
|
||||
elif label.name in patch_labels:
|
||||
return("patch")
|
||||
labels.add(label.name)
|
||||
|
||||
if any(label in labels for label in minor_labels):
|
||||
return "minor"
|
||||
|
||||
if any(label in labels for label in patch_labels):
|
||||
return "path"
|
||||
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue