Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh

Commit

A repository's header says what it is on every page of it: its description, website and topics now show under its name on Code, its folders and files, Commits, Branches, Tags, Releases and Compare as they already did on Issues, Pull requests and the rest, where before the files' pages left them out for an About beside the files. That About no longer repeats them: the facts beside the files (readme, license, security policy, activity, stars, watching, then releases, packages, contributors and languages) stand without a title, description or link. The website is the project's homepage when it has one, else the repository's website, as the About chose it. Managing a repository describes the header and the facts beside the files. Checked: the site's typecheck (tsc -b --force), its 911 tests and a production build.

syntaqxcommitted Parentfb1fa31Browse files
6 files+31−380/6 viewed
+9−5
11 ---
22 title: Managing a repository
3−description: What a repository's About shows, and how to rename it or a branch, change its default branch, website and topics, make it public or private, archive it, and delete and restore it.
3+description: What a repository's header and Code page show, and how to rename it or a branch, change its default branch, website and topics, make it public or private, archive it, and delete and restore it.
44 ---
55
66 A repository's details and its lifecycle are managed from its
99 server. This guide covers each change, who can make it, and what happens
1010 when you do.
1111
12−## The About beside the files
12+## What it is, and the facts beside the files
13+
14+The header at the top of every page of a repository (Code, Issues, Pull
15+requests, Actions, Settings and the rest) shows its description, website
16+and topics, as you set them under [Edit the details](#edit-the-details).
17+The website is the project's homepage when it has one.
1318
14−A repository's **Code** page shows its files with an **About** beside them,
15−the way most code hosts lay it out. On a phone it comes after the files.
19+The **Code** page shows its files with its facts beside them. On a phone
20+they come after the files.
1621
1722 | Part | What it shows |
1823 | --- | --- |
19−| Description, website, topics | What you set under [Edit the details](#edit-the-details). |
2024 | **Readme** | A link to the README shown under the files. |
2125 | **License** | The license its `LICENSE` file holds, such as **MIT license**, linked to the file. **View license** when the text is not one g1t recognizes. `LICENCE`, `COPYING` and `UNLICENSE` are read too, with or without an extension, and an `SPDX-License-Identifier` line says it outright. |
2226 | **Security policy** | A link to `SECURITY.md` at the root, or in `.g1t`, `.github` or `docs`. |
+5−19
11 /**
2− * The About beside a repository's files: what it is (description, home
3− * page, topics), what its files say (readme, license, security policy),
4− * how people follow it (activity, stars, watching), then its releases,
2+ * The facts beside a repository's files (what it is, its home page and
3+ * topics are the header's, on every page of it): what its files say
4+ * (readme, license, security policy), how people follow it (activity,
5+ * stars, watching), then its releases,
56 * deployments, packages, contributors and languages, each a section.
67 *
78 * What is read from the default branch (license, languages, contributors)
1314 Activity,
1415 BookOpen,
1516 Eye,
16− Link2,
1717 Package as PackageIcon,
1818 Plus,
1919 Scale,
3131 import { CommitAvatar, CommitName } from "./commit-person";
3232 import { UserCard } from "./user-card";
3333 import { PackageIcon as EcosystemIcon } from "./package-icon";
34−import { Topics } from "./topics";
3534 import { TimeAgo } from "./ui";
3635 import { Avatar } from "./ui/avatar";
3736 import { Badge } from "./ui/badge";
409408 readme,
410409 data,
411410 canPush,
412− homepage,
413411 deployments = null,
414412 }: {
415413 repo: Repo;
417415 readme: boolean;
418416 data: AboutData;
419417 canPush: boolean;
420− /** The project's homepage (lib/about.ts `projectHomepage`); the repository's website when null. */
421− homepage?: string | null;
422418 /** The Deployments section (deployments-panel.tsx): each environment's latest. */
423419 deployments?: ReactNode;
424420 }) {
425421 const base = `/${repo.namespace}/${repo.name}`;
426− const site = homepage ?? repo.website ?? null;
427422 const facts = (about: RepoAbout | null, watchers: number | null) => <Facts base={base} gitRef={gitRef} about={about} watchers={watchers} />;
428423 return (
429424 <aside className="space-y-4">
430425 <div>
431− <h2 className="text-base font-semibold">About</h2>
432− <p className="mt-2.5 text-sm text-fg-soft">{repo.description ?? (site || repo.topics.length > 0 ? "No description." : "No description, website, or topics provided.")}</p>
433− {site && (
434− <a href={site} rel="noopener nofollow" className="mt-2.5 flex min-w-0 items-center gap-2 text-sm font-medium text-accent hover:underline">
435− <Link2 size={15} className="shrink-0" />
436− <span className="truncate">{site.replace(/^https?:\/\//, "").replace(/\/$/, "")}</span>
437− </a>
438− )}
439− <Topics topics={repo.topics} className="mt-3" />
440− <ul className="mt-4 space-y-2.5 text-sm text-muted">
426+ <ul className="space-y-2.5 text-sm text-muted">
441427 {readme && (
442428 <Row icon={<BookOpen size={15} />}>
443429 <a href="#readme" className={ROW_LINK}>
+0−4
334334 checks = null,
335335 about = null,
336336 canPush = false,
337− homepage = null,
338337 deployments = null,
339338 }: {
340339 tree: Tree;
347346 about?: AboutData | null;
348347 /** Whether the viewer may push, for the About's "Create a new release". */
349348 canPush?: boolean;
350− /** The project's homepage; the repository's website when null. */
351− homepage?: string | null;
352349 /** The repository's environments, for the About's Deployments section. */
353350 deployments?: DeploymentEnvironments | null;
354351 }) {
424421 readme={Boolean(readme)}
425422 data={about ?? { about: null, watchers: null, packages: null, tags: null }}
426423 canPush={canPush}
427− homepage={homepage}
428424 deployments={<DeploymentsPanel base={base} summary={deployments} className="border-t border-line pt-4" />}
429425 />
430426 )}
+0−2
88 import { showOneCommit } from "../../lib/commit-people.server";
99 import { repos } from "../../lib/services.server";
1010 import { getViewer, unwrap } from "../../lib/session.server";
11−import { projectHomepage } from "../../lib/about";
1211 import { useProject } from "./layout";
1312 import { repoPages } from "../../lib/repo-live";
1413 import { useRepoLive } from "../../lib/use-repo-live";
5352 checks={loaderData.checks}
5453 about={loaderData.about}
5554 canPush={Boolean(project?.access.can.push)}
56− homepage={projectHomepage(project?.project ?? null)}
5755 deployments={loaderData.deployments}
5856 />
5957 );
+17−6
11 import { waitUntil } from "cloudflare:workers";
2−import { Box, Lock } from "lucide-react";
2+import { Box, Link2, Lock } from "lucide-react";
33 import type { ReactNode } from "react";
44 import { Link, Outlet, type ShouldRevalidateFunctionArgs, data, useLocation, useRouteLoaderData } from "react-router";
55
77
88 import type { Route } from "./+types/layout";
99 import { Topics } from "../../components/topics";
10+import { projectHomepage } from "../../lib/about";
1011 import { page } from "../../lib/meta";
1112 import { type Tab as PageTab, tabsFor } from "../../lib/project-nav";
1213 import { Badge } from "../../components/ui/badge";
170171 const base = `/${repo.namespace}/${repo.name}`;
171172 // The project's own description, else the repository's as it is now.
172173 const description = (project && !project.descriptionInherited ? project.description : null) ?? repo.description;
174+ // Its homepage, else the repository's website.
175+ const site = projectHomepage(project) ?? repo.website ?? null;
173176 const { pathname } = useLocation();
174177 const rest = pathname.slice(base.length + 1);
175178 const tabs = tabsFor(rest, member, access.can);
176− // The files' own About says what it is and its topics, as the one place.
177− const filesPage = /^(code|tree|blob|commits?|branches|tags|releases|compare)(\/|$)/.test(rest);
178179 // One row of tabs for the project's pages, along the header's border (a
179180 // member's sidebar has them on a computer), and the views of the section
180181 // the page is in as a quieter row at the top of its content.
201202 ) : null
202203 }
203204 />
204− {/* On the files' pages, About says what it is and shows its topics, as the one place. */}
205− {!filesPage && description && <p className="mt-2 line-clamp-2 max-w-3xl text-sm text-muted">{description}</p>}
206− {!filesPage && <Topics topics={repo.topics} className="mt-3" />}
205+ {/* What it is, where it lives and its topics, the same on every page of it. */}
206+ {description && <p className="mt-2 line-clamp-2 max-w-3xl text-sm text-muted">{description}</p>}
207+ {site && (
208+ <a
209+ href={site}
210+ rel="noopener nofollow"
211+ className="mt-1.5 flex w-fit max-w-full min-w-0 items-center gap-1.5 text-sm font-medium text-accent hover:underline"
212+ >
213+ <Link2 size={14} className="shrink-0" />
214+ <span className="truncate">{site.replace(/^https?:\/\//, "").replace(/\/$/, "")}</span>
215+ </a>
216+ )}
217+ <Topics topics={repo.topics} className="mt-3" />
207218 <div className={signedIn ? "mt-3 md:hidden" : "mt-3"}>
208219 <ProjectStrip base={base} member={member} can={access.can} settings={seesSettings(access)} counts={loaderData.open} always={!signedIn} />
209220 </div>
+0−2
99 import { showOneCommit } from "../../lib/commit-people.server";
1010 import { repos } from "../../lib/services.server";
1111 import { getViewer, unwrap } from "../../lib/session.server";
12−import { projectHomepage } from "../../lib/about";
1312 import { useProject } from "./layout";
1413 import { repoPages } from "../../lib/repo-live";
1514 import { useRepoLive } from "../../lib/use-repo-live";
5857 checks={loaderData.checks}
5958 about={loaderData.about}
6059 canPush={Boolean(project?.access.can.push)}
61− homepage={projectHomepage(project?.project ?? null)}
6260 deployments={loaderData.deployments}
6361 />
6462 );

Comments

Sign in to comment.