Unverified Commit 6d459c7b authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Update PR labeling requirements (#4618)

parent 8fe72d13
...@@ -12,15 +12,19 @@ from typing import Any, Optional, Set, Tuple ...@@ -12,15 +12,19 @@ from typing import Any, Optional, Set, Tuple
import requests import requests
# If the PR has any of these labels, we accept it as properly labeled. # For a PR to be properly labeled it should have one primary label and one secondary label
REQUIRED_LABELS = { PRIMARY_LABELS = {
"new feature", "new feature",
"bug", "bug",
"code quality", "code quality",
"enhancement", "enhancement",
"bc-breaking", "bc-breaking",
"dependency issue",
"deprecation", "deprecation",
"other",
}
SECONDARY_LABELS = {
"dependency issue",
"module: c++ frontend", "module: c++ frontend",
"module: ci", "module: ci",
"module: datasets", "module: datasets",
...@@ -69,7 +73,7 @@ if __name__ == "__main__": ...@@ -69,7 +73,7 @@ if __name__ == "__main__":
sys.exit(0) sys.exit(0)
merger, labels = get_pr_merger_and_labels(pr_number) merger, labels = get_pr_merger_and_labels(pr_number)
is_properly_labeled = bool(REQUIRED_LABELS.intersection(labels)) is_properly_labeled = bool(PRIMARY_LABELS.intersection(labels) and SECONDARY_LABELS.intersection(labels))
if not is_properly_labeled: if not is_properly_labeled:
print(f"@{merger}") print(f"@{merger}")
...@@ -32,4 +32,4 @@ jobs: ...@@ -32,4 +32,4 @@ jobs:
message: | message: |
Hey ${{ steps.commit.outputs.merger }}! Hey ${{ steps.commit.outputs.merger }}!
You merged this PR, but no labels were added. You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment