Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5420e70
docs: design spec for GitlabRoadmap component
ebuildy Jul 10, 2026
e9942eb
docs: implementation plan for GitlabRoadmap component
ebuildy Jul 10, 2026
f2e14f0
Merge branch 'main' of github.com:ebuildy/docusaurus-plugin-gitlab
ebuildy Jul 16, 2026
42ee071
Merge branch 'main' of github.com:ebuildy/docusaurus-plugin-gitlab
ebuildy Jul 16, 2026
067ec4e
docs: design spec for GitlabUser/GitlabUsers components
ebuildy Jul 16, 2026
1d45781
docs: implementation plan for GitlabUser/GitlabUsers components
ebuildy Jul 16, 2026
13c7624
feat: shared show/role helpers and UserData type for user components
ebuildy Jul 16, 2026
48a5d1f
feat: client methods for users and group/project members
ebuildy Jul 16, 2026
01ed8c5
docs: broaden PageOptions comment to cover member endpoints
ebuildy Jul 16, 2026
fb65916
feat: fetchUser — resolve a username to a normalized, cached profile
ebuildy Jul 16, 2026
b0c9844
fix: case-insensitive username resolution and canonical memo key in f…
ebuildy Jul 16, 2026
ce5b46c
feat: fetchUsers — group/project members with role filter and enrich-…
ebuildy Jul 16, 2026
eeab3ce
fix: effective-role dedupe, resilient enrichment, integer limit in fe…
ebuildy Jul 16, 2026
142e564
feat: register GitlabUser and GitlabUsers in the remark component reg…
ebuildy Jul 16, 2026
a05ccbb
feat: GitlabUser component with shared UserCard partial
ebuildy Jul 16, 2026
74e52bb
feat: GitlabUsers component — members cards grid with ComponentLayout…
ebuildy Jul 17, 2026
07f3de5
feat: user card styles in theme.css; reuse gitlab-card-header layout
ebuildy Jul 17, 2026
ce0896d
style: static grid-template-columns fallback for gitlab-user-cards
ebuildy Jul 17, 2026
4a1085a
feat: export GitlabUser, GitlabUsers and UserData
ebuildy Jul 17, 2026
a179328
docs: GitlabUser/GitlabUsers pages, README sections, and e2e coverage
ebuildy Jul 17, 2026
7626005
docs: review polish — badge-scoped e2e assertion, accurate enrichment…
ebuildy Jul 17, 2026
0478ce3
feat: right-aligned info block with emoji-prefixed lines on user cards
ebuildy Jul 18, 2026
07440a8
feat: hide zero followers/following counts on user cards
ebuildy Jul 18, 2026
b08e4af
feat: bio in identity block; info wraps below on narrow cards (contai…
ebuildy Jul 19, 2026
27cc793
chore: add mise tasks
ebuildy Jul 19, 2026
d26fea5
feat(user): theming
ebuildy Jul 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,17 @@ static HTML. The browser never holds a token or calls the GitLab API.
`require` export condition; `test/packaging.test.ts` guards this.
- `pnpm test` — run all tests (Vitest). Use `pnpm exec vitest run <file>` for one file.
- `pnpm run typecheck` — `tsc --noEmit`.

There is no dev server. After code edits, run
- **mise tasks** (`mise.toml`) mirror the pnpm scripts:
`mise run setup | lint | lint:fix | typecheck | test | build`, plus
`mise run release` (runs the full gate locally and shows the pending
release-please PR — never publishes) and example-site tasks that rebuild
`dist/` first: `gitlab:build`/`gitlab:start` (showcase site, live gitlab.com
data) and `site:build`/`site:start` (`examples/site` is the e2e fixture —
its stub projects 404 against real gitlab.com, so `site:build` only works
with `GITLAB_HOST` pointing at a stub; `site:start` renders Fallbacks in dev).

There is no dev server for the package itself (`mise run gitlab:start` serves
the showcase site to see components live). After code edits, run
`pnpm exec vitest run` and `pnpm run typecheck`. The e2e test
(`test/e2e/build.test.ts`) builds a real Docusaurus site and is slow (~1 min);
run it explicitly when touching the pipeline.
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,20 @@ pnpm run build # bundle the package into dist/
| `pnpm run lint:fix` | Auto-fix lint issues |
| `pnpm run build` | Compile with tsc (ESM-only + types) |

All of these are also exposed as **mise tasks** (`mise tasks` to list):
`mise run setup | lint | lint:fix | typecheck | test | build | release`.

The example sites have their own READMEs:
[`examples/site`](./examples/site/README.md) (mocked, drives the e2e) and
[`examples/gitlab`](./examples/gitlab/README.md) (live gitlab.com data).
They have mise tasks too — each rebuilds the plugin's `dist/` first:

| Task | What it does |
|---|---|
| `mise run gitlab:build` / `gitlab:start` | Build / serve the showcase site (`examples/gitlab`, live gitlab.com data) |
| `mise run site:build` / `site:start` | Build / serve the e2e fixture site (`examples/site`) — its stub projects 404 against real gitlab.com, so `site:build` needs `GITLAB_HOST` pointing at an instance that has them (the e2e test provides a stub); `site:start` works in dev (failed fetches render the Fallback) |

Both sites read `GITLAB_TOKEN` / `GITLAB_HOST` from the environment.

## Conventions

Expand Down Expand Up @@ -80,6 +91,9 @@ and published to npm with provenance via OIDC trusted publishing.
`publish` job runs `npm publish --provenance --access public`. No npm token is
stored — publishing authenticates via GitHub OIDC.

`mise run release` runs the full gate locally (frozen install, lint, typecheck,
test, build) and then shows the pending release PR — it never publishes.

### One-time setup

- On npmjs.com, add `ebuildy/docusaurus-plugin-gitlab` +
Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,46 @@ Both components render [scoped labels/topics](https://docs.gitlab.com/ee/user/pr
(`scope::value`, e.g. `Abilities::Performance`) as a two-part badge — the scope keeps its
color and the value gets a dark-gray background. The split is on the last `::`.

### `<GitlabUser>`

A user profile as a small card: photo, display name, linked `@username`, and
configurable profile sections from the public user API.

```mdx
<GitlabUser name="jdoe" />

<GitlabUser name="jdoe" show="org,bio,counts" />
```

| Prop | Type | Default | Description |
|---|---|---|---|
| `name` | string | required | GitLab username |
| `show` | string | `org,location,bio,counts,since` | Card sections: `org`, `location`, `bio`, `counts` (followers/following), `since` (member since) |

### `<GitlabUsers>`

The members of a group **or** project (inherited included) as a grid of user cards.

```mdx
<GitlabUsers group="my-group" role="developer" />

<GitlabUsers project="group/repo" show="role,org,counts" cardColumns={3} gap="1rem" />
```

| Prop | Type | Default | Description |
|---|---|---|---|
| `group` | string \| number | — | Provide either `group` or `project` |
| `project` | string \| number | — | Provide either `group` or `project` |
| `role` | string | — | Exact-match filter: `guest`, `reporter`, `developer`, `maintainer`, `owner`, … |
| `show` | string | `role` | `<GitlabUser>` tokens plus `role` (role badge) |
| `limit` | number | all | Max members to show (fetch capped at 500) |

The grid accepts the shared card-grid props: `cardColumns`, `cardMinWidth`
(default `260px`), `gap`, `maxWidth`, `align`. The default `show="role"` costs a
single members call; profile tokens add one cached profile lookup per member at
build time (two API requests per member on a cold build, deduplicated across
pages and builds).

### `<GitlabRoadmap>`

Renders a timeline of GitLab **epics** (Premium/Ultimate, group-level) or
Expand Down
Loading
Loading