Skip to content

Commit 1cbd8cd

Browse files
authored
Merge pull request #30 from endlessm/pr-fixes
Miscellaneous PR-related fixes
2 parents 7e3f05b + 8a1c349 commit 1cbd8cd

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

branches.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{% endif %}
1616
{% if branch.pull_request %}
1717
from pull request
18-
<a href="{{ branch.pull_request.url }}">#{{ branch.pull_request.number }}: {{ branch.pull_request.title }}</a>
18+
<a href="{{ branch.pull_request.html_url }}">#{{ branch.pull_request.number }}: {{ branch.pull_request.title }}</a>
1919
{% endif %}
2020
{% if not branch.build %}
2121
(never built)

godoctopus.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,27 @@ def main() -> None:
220220

221221
for org, fork in web_artifacts.items():
222222
for branch_name, branch in fork.live_branches.items():
223+
if not branch.build and org != default_org:
224+
logging.debug(
225+
"Ignoring never-built third-party branch %s:%s", org, branch_name
226+
)
227+
continue
228+
223229
item: dict[str, Any] = {"name": f"{org}/{branch_name}"}
224230

225231
try:
226-
item["pull_request"] = pull_requests[f"{org}:{branch_name}"][0]
232+
pull_request = pull_requests[f"{org}:{branch_name}"][0]
227233
except (KeyError, IndexError):
228234
pass
235+
else:
236+
if pull_request["state"] == "closed":
237+
logging.info(
238+
"Ignoring branch %s; newest pull request %s is closed",
239+
item["name"],
240+
pull_request["url"],
241+
)
242+
continue
243+
item["pull_request"] = pull_request
229244

230245
if branch.build:
231246
item["build"] = branch.build

0 commit comments

Comments
 (0)