diff --git a/.github/scripts/label_utils.py b/.github/scripts/label_utils.py index 53daf222250..609316cfe2b 100644 --- a/.github/scripts/label_utils.py +++ b/.github/scripts/label_utils.py @@ -22,9 +22,7 @@ LABEL_ERR_MSG_TITLE = "This PR needs a `release notes:` label" LABEL_ERR_MSG = f"""# {LABEL_ERR_MSG_TITLE} -If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with `release notes:`. - -If not, please add the `release notes: none` label. +If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with `release notes:`. This helps us keep track and include your important work in the next release notes. To add a label, you can comment to pytorchbot, for example `@pytorchbot label "release notes: none"` diff --git a/.github/scripts/trymerge.py b/.github/scripts/trymerge.py index 5a45089508a..124fc4ecbad 100755 --- a/.github/scripts/trymerge.py +++ b/.github/scripts/trymerge.py @@ -59,12 +59,7 @@ patterns_to_regex, retries_decorator, ) -from label_utils import ( - gh_add_labels, - gh_remove_label, - has_required_labels, - LABEL_ERR_MSG, -) +from label_utils import gh_add_labels, gh_remove_label from trymerge_explainer import get_revert_message, TryMergeExplainer # labels @@ -2116,9 +2111,6 @@ def merge( # Check for approvals find_matching_merge_rule(pr, repo, skip_mandatory_checks=True) - if not has_required_labels(pr): - raise RuntimeError(LABEL_ERR_MSG.lstrip(" #")) - if ignore_current: checks = pr.get_checkrun_conclusions() _, failing, _ = categorize_checks( diff --git a/.github/workflows/check-labels.yml b/.github/workflows/check-labels.yml index 19c70c820a8..65da3052155 100644 --- a/.github/workflows/check-labels.yml +++ b/.github/workflows/check-labels.yml @@ -51,4 +51,4 @@ jobs: PR_NUM: ${{ github.event.number || github.event.inputs.pr_number }} run: | set -ex - python3 .github/scripts/check_labels.py --exit-non-zero "${PR_NUM}" + python3 .github/scripts/check_labels.py "${PR_NUM}"