Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
don't post messages PRS with stale label
Browse files Browse the repository at this point in the history
fixes #7
  • Loading branch information
ericLemanissier committed Dec 11, 2020
1 parent 6f05b2c commit ee25257
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def update_pr_messages(self):
if len(self.libs[lib_name]) <= 1:
continue
for issue_number in self.libs[lib_name]:
if any(label["name"] == "stale" for label in self.prs[issue_number]["labels"]):
print("skipping %s message because PR is stale" % issue_number)
if dateutil.parser.isoparse(self.prs[issue_number]["updated_at"]) < datetime.now(timezone.utc) - timedelta(days=15):
print("skipping %s message because PR has not been updated since %s" % (issue_number, self.prs[issue_number]["updated_at"]))
continue
Expand Down

0 comments on commit ee25257

Please sign in to comment.