Skip to content

Commit

Permalink
Add combined link for all workspaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikerkelly committed Feb 9, 2025
1 parent e431123 commit 94b7f05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
14 changes: 11 additions & 3 deletions tests/workspace/test_dependabot_rota.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
TEAM_REX = [People.JON, People.LUCY, People.KATIE]

EXTRA_TEXT = (
"\nReview <https://github.com/opensafely-core/job-server/pulls|job-server>, "
"\nReview repos <https://github.com/opensafely-core/job-server/pulls|job-server>, "
"<https://github.com/opensafely-core/opencodelists/pulls|opencodelists>, "
"<https://github.com/ebmdatalab/metrics/pulls|metrics>, "
"<https://github.com/opensafely-core/reports/pulls|reports>, "
"<https://github.com/opensafely-core/actions-registry/pulls|actions-registry> "
"and <https://github.com/opensafely-core/research-template-docker/pulls|research-template-docker> "
"repos and merge any outstanding non-NPM Dependabot/update-dependencies-action PRs."
"and <https://github.com/opensafely-core/research-template-docker/pulls|research-template-docker>. "
"<https://github.com/pulls?q=is%3Apr+is%3Aopen+repo%3A"
"opensafely-core%2Fjob-server+"
"repo%3Aopensafely-core%2Fopencodelists+"
"repo%3Aebmdatalab%2Fmetrics+"
"repo%3Aopensafely-core%2Freports+"
"repo%3Aopensafely-core%2Factions-registry+"
"repo%3Aopensafely-core%2Fresearch-template-docker"
"|Combined link>. "
"Merge any outstanding non-NPM Dependabot/update-dependencies-action PRs."
"\nReview Thomas' PRs for NPM updates.\n"
)

Expand Down
8 changes: 6 additions & 2 deletions workspace/dependabot/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ def report_rota() -> str:
repo_links = [
f"<https://github.com/{org}/{repo}/pulls|{repo}>" for org, repo in repos
]
combined_link = "https://github.com/pulls?q=is%3Apr+is%3Aopen+" + "+".join(
f"repo%3A{org}%2F{repo}" for org, repo in repos
)

repo_links_text = ", ".join(repo_links[:-1]) + " and " + repo_links[-1]
extra_text = (
f"\nReview {repo_links_text} "
"repos and merge any outstanding non-NPM Dependabot/update-dependencies-action PRs.\n"
f"\nReview repos {repo_links_text}. <{combined_link}|Combined link>. "
"Merge any outstanding non-NPM Dependabot/update-dependencies-action PRs.\n"
"Review Thomas' PRs for NPM updates.\n"
)

Expand Down

0 comments on commit 94b7f05

Please sign in to comment.