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
renzhc
diffusers_dcu
Commits
ec953047
Unverified
Commit
ec953047
authored
Mar 01, 2024
by
YiYi Xu
Committed by
GitHub
Mar 01, 2024
Browse files
[stalebot] fix a bug (#7156)
fix Co-authored-by:
yiyixuxu
<
yixu310@gmail,com
>
parent
9a2600ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
utils/stale.py
utils/stale.py
+2
-2
No files found.
utils/stale.py
View file @
ec953047
...
@@ -39,7 +39,7 @@ def main():
...
@@ -39,7 +39,7 @@ def main():
open_issues
=
repo
.
get_issues
(
state
=
"open"
)
open_issues
=
repo
.
get_issues
(
state
=
"open"
)
for
issue
in
open_issues
:
for
issue
in
open_issues
:
labels
=
[
label
.
name
for
label
in
issue
.
get_labels
()]
labels
=
[
label
.
name
.
lower
()
for
label
in
issue
.
get_labels
()]
if
"stale"
in
labels
:
if
"stale"
in
labels
:
comments
=
sorted
(
issue
.
get_comments
(),
key
=
lambda
i
:
i
.
created_at
,
reverse
=
True
)
comments
=
sorted
(
issue
.
get_comments
(),
key
=
lambda
i
:
i
.
created_at
,
reverse
=
True
)
last_comment
=
comments
[
0
]
if
len
(
comments
)
>
0
else
None
last_comment
=
comments
[
0
]
if
len
(
comments
)
>
0
else
None
...
@@ -50,7 +50,7 @@ def main():
...
@@ -50,7 +50,7 @@ def main():
elif
(
elif
(
(
dt
.
now
(
timezone
.
utc
)
-
issue
.
updated_at
).
days
>
23
(
dt
.
now
(
timezone
.
utc
)
-
issue
.
updated_at
).
days
>
23
and
(
dt
.
now
(
timezone
.
utc
)
-
issue
.
created_at
).
days
>=
30
and
(
dt
.
now
(
timezone
.
utc
)
-
issue
.
created_at
).
days
>=
30
and
not
any
(
label
.
name
.
lower
()
in
LABELS_TO_EXEMPT
for
label
in
labels
)
and
not
any
(
label
in
LABELS_TO_EXEMPT
for
label
in
labels
)
):
):
# Post a Stalebot notification after 23 days of inactivity.
# Post a Stalebot notification after 23 days of inactivity.
issue
.
create_comment
(
issue
.
create_comment
(
...
...
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