GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): an unreachable environment no longer hides pull requests from repositories it shares by johns1x · Pull Request #34088 · pingdotgg/t3code

fix(web): an unreachable environment no longer hides pull requests from repositories it shares #34088

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.

Sign up for GitHub

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

Merged
juliusmarminge merged 4 commits into pingdotgg:main from johns1x:js/pr-list-offline-env
Nov 15, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix(web): an unreachable environment no longer hides pull requests from repositories it shares #34088

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit Hold shift + click to select a range
f77656e
fix(web): an unreachable environment no longer hides pull requests fr…
johns1x Nov 10, 2026
bdc13a9
Merge remote-tracking branch 'github/main' into js/pr-list-offline-env
maria-rcks Nov 11, 2026
b2dec42
fix(web): prefer a reachable copy when every copy of a repository is …
maria-rcks Nov 11, 2026
8f6b512
Merge remote-tracking branch 'origin/main' into js/pr-list-offline-env
juliusmarminge Nov 15, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(web): prefer a reachable copy when every copy of a repository is …
…unreadable
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks
maria-rcks committed Nov 11, 2026
commit b2dec425b5939d97f0f0f1a7115ca401993dc844

There are no files selected for viewing

11 changes: 11 additions & 0 deletions 11 apps/web/src/components/pullRequest/pullRequestProjectAssignment.logic.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,17 @@ describe("one server per repository", () => {
new Set(envs("env-1")),
);
expect(plain(assignment)).toEqual({ "env-1": ["b1"], "env-2": ["a2"] });
const unreadableHost = assignProjectsToEnvironments(
[
project("a1", "env-1", "github.com/acme/app"),
project("a2", "env-2", "github.com/acme/app"),
],
envs("env-1", "env-2"),
"env-1" as EnvironmentId,
new Map([["env-2" as EnvironmentId, hostAvailability(new Map([["github.com", false]]))]]),
new Set(envs("env-1")),
);
expect(plain(unreadableHost)).toEqual({ "env-2": ["a2"] });
});

it("falls back from an unreadable host without moving other repositories", () => {
Expand Down
11 changes: 6 additions & 5 deletions 11 apps/web/src/components/pullRequest/pullRequestProjectAssignment.logic.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ export function assignProjectsToEnvironments(
const rank = new Map(environmentIds.map((id, index) => [id, index] as const));
const owner = new Map<string, AssignableProject>();
const unreadable = (project: AssignableProject) => {
if (unreachableEnvironmentIds.has(project.environmentId)) return true;
const availability = hostAvailability?.get(project.environmentId);
const host =
availability?.projectHosts.get(project.id)?.host ??
Expand All @@ -139,6 +138,8 @@ export function assignProjectsToEnvironments(
);
return availability?.hosts.get(host)?.configured === false;
};
const cost = (project: AssignableProject) =>
(unreachableEnvironmentIds.has(project.environmentId) ? 2 : 0) + (unreadable(project) ? 1 : 0);
for (const project of projects) {
const key = repositoryKey(project);
if (!key) continue;
Expand All @@ -149,10 +150,10 @@ export function assignProjectsToEnvironments(
owner.set(key, project);
continue;
}
const currentUnreadable = unreadable(current);
const candidateUnreadable = unreadable(project);
if (currentUnreadable !== candidateUnreadable) {
if (currentUnreadable) owner.set(key, project);
const currentCost = cost(current);
const candidateCost = cost(project);
if (currentCost !== candidateCost) {
if (candidateCost < currentCost) owner.set(key, project);
continue;
}
if (current.environmentId === preferredEnvironmentId) continue;
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.