Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR review companion adds noisy GitHub links between issues and PRs #12211

Open
bsmth opened this issue Nov 29, 2024 · 0 comments
Open

PR review companion adds noisy GitHub links between issues and PRs #12211

bsmth opened this issue Nov 29, 2024 · 0 comments
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. pr-companion PR review companion for content PRs

Comments

@bsmth
Copy link
Member

bsmth commented Nov 29, 2024

On each new pull request, the PR companion leaves a comment with preview URLs. One of the features of the comment is a list of external links in each docs page. This has the unintended side effect that PRs will be linked on GitHub.com, even if the PR content / motivation is unrelated.

Example outcome:

Check https://github.com/httpwg/http-core/issues/26 for example. Have a look at the occurrences of [github-actions](https://github.com/apps/github-actions) bot mentioned this issue events. This HTTPWG issue is referenced in prose in a docs page. Every PR that modifies this page creates a link back to the PR because of the bot preview URLs comment. In most cases, this is not helpful.

Suggestion:

Consider wrapping github.com/*/*/pulls/[0-9]+ and github.com/*/*/issues/[0-9]+ links in backticks instead of allowing the raw URLs to be passed through.

Problem area:

if external_urls:
external_urls_list = []
for url in sorted(external_urls):
count = external_urls[url]
line = (
f" - {'🚨 ' if url.startswith('http://') else ''}"
f"<{url}> ({count} time{'' if count==1 else 's'})"
)
if diff_lines:
# If this was available and it _did_ fine a URL, then
# really make sure it's noticed.
line += " (Note! This may be a new URL 👀)"
external_urls_list.append(line)
comments.append((doc, "\n".join(external_urls_list)))
total_urls += len(external_urls_list)

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 29, 2024
@caugner caugner added the pr-companion PR review companion for content PRs label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. pr-companion PR review companion for content PRs
Projects
None yet
Development

No branches or pull requests

2 participants