Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
6d459c7b
Unverified
Commit
6d459c7b
authored
Oct 14, 2021
by
Nicolas Hug
Committed by
GitHub
Oct 14, 2021
Browse files
Update PR labeling requirements (#4618)
parent
8fe72d13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
.github/process_commit.py
.github/process_commit.py
+8
-4
.github/workflows/pr-labels.yml
.github/workflows/pr-labels.yml
+1
-1
No files found.
.github/process_commit.py
View file @
6d459c7b
...
@@ -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 properl
y label
ed.
#
For a PR to be properly labeled it should have one primary label and one secondar
y 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
}
"
)
.github/workflows/pr-labels.yml
View file @
6d459c7b
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment