diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d3f301b99..3f85525c26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/tools/ci_tools.py b/tools/ci_tools.py index bbe0c699d1..337b19a346 100644 --- a/tools/ci_tools.py +++ b/tools/ci_tools.py @@ -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