async def _from_forge(
        self,
        forge: str,
        event: Omnibox.ForgeCommand,
        builder: Callable[[str, str, str | None, str | None], Awaitable[URL | None]],
    ) -> None:
        """Build a URL for getting a file from a given forge.

        Args:
            forge: The display name of the forge.
            event: The event that contains the request information for the file.
            builder: The function that builds the URL.
        """
        if url := await builder(
            event.owner, event.repository, event.branch, event.desired_file
        ):
            self.visit(url)
        else:
            self.app.push_screen(
                ErrorDialog(
                    f"Unable to work out a {forge} URL",
                    f"After trying a few options it hasn't been possible to work out the {forge} URL.\n\n"
                    "Perhaps the file you're after is on an unusual branch, or the spelling is wrong?",
                )
            )
Build a URL for getting a file from a given forge.

        Args:
            forge: The display name of the forge.
            event: The event that contains the request information for the file.
            builder: The function that builds the URL.
        
frogmouth/screens/main.py