Only show new PRs, and include issue URL
This commit is contained in:
parent
301ec5c8f7
commit
7d4cfd702e
1 changed files with 8 additions and 6 deletions
|
@ -45,7 +45,7 @@ class PullRequest:
|
||||||
try:
|
try:
|
||||||
with open(self.seen_prs_file, "r") as f:
|
with open(self.seen_prs_file, "r") as f:
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
if line.strip() == obj["merge_commit_sha"]:
|
if line.strip() == str(obj["id"]):
|
||||||
return True
|
return True
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
@ -54,14 +54,16 @@ class PullRequest:
|
||||||
|
|
||||||
def mark_pr_as_seen(self, obj):
|
def mark_pr_as_seen(self, obj):
|
||||||
with open(self.seen_prs_file, "a") as f:
|
with open(self.seen_prs_file, "a") as f:
|
||||||
f.write(obj["merge_commit_sha"] + "\n")
|
f.write(str(obj["id"]) + "\n")
|
||||||
|
|
||||||
|
|
||||||
def prettyprint(self, repo_name, obj):
|
def prettyprint(self, repo_name, obj):
|
||||||
return "New PR in " + repo_name \
|
return "New PR in " + repo_name \
|
||||||
+ ": '" + obj["title"] \
|
+ ": '" + obj["title"] \
|
||||||
+ "' by " \
|
+ "' by " \
|
||||||
+ obj["user"]["login"]
|
+ obj["user"]["login"] \
|
||||||
|
+ " - " \
|
||||||
|
+ obj["html_url"]
|
||||||
|
|
||||||
def check_all(self):
|
def check_all(self):
|
||||||
for repo in self.repos:
|
for repo in self.repos:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue