On this page
Development Guide
Development Guide
Guide for developers who want to contribute to gitlab-summary or build from source.
Prerequisites
Required
- .NET 10 SDK: https://dotnet.microsoft.com/download
- Node.js 18+: https://nodejs.org
- Git: https://git-scm.com
- GitLab account with access to test groups
Recommended
- Visual Studio Code or Visual Studio 2022
- GitHub account (for contributing)
- GitLab Personal Access Token (for testing)
Getting the Source
Clone Repository
git clone https://github.com/garrardkitchen/gitlab-summary.git
cd gitlab-summary
Fork (for Contributing)
- Fork on GitHub: Click “Fork” button
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/gitlab-summary.git cd gitlab-summary - Add upstream:
git remote add upstream https://github.com/garrardkitchen/gitlab-summary.git
Project Structure
gitlab-summary/
├── src/
│ ├── cli/ # .NET CLI Application
│ │ ├── GitLabSummary/ # Main project
│ │ │ ├── Commands/ # CLI command handlers
│ │ │ │ ├── PipelinesCommand.cs
│ │ │ │ ├── ServeCommand.cs
│ │ │ │ ├── TokenCommand.cs
│ │ │ │ └── UrlCommand.cs
│ │ │ ├── Models/ # Data models
│ │ │ │ ├── GitLabModels.cs
│ │ │ │ └── Settings.cs
│ │ │ ├── Services/ # Business logic
│ │ │ │ ├── GitLabApiClient.cs
│ │ │ │ ├── PipelineAggregator.cs
│ │ │ │ ├── CredentialsService.cs
│ │ │ │ └── CopilotAnalysisService.cs
│ │ │ ├── Rendering/ # Console output formatters
│ │ │ └── Configuration/ # App configuration
│ │ └── GitLabSummary.Tests/ # Unit tests
│ └── dashboard/ # Vue 3 Dashboard
│ └── src/
│ ├── composables/ # Vue composables
│ │ ├── usePipelineStream.ts
│ │ ├── useCopilotAnalysis.ts
│ │ └── useFormatters.ts
│ ├── components/ # Vue components
│ │ ├── PipelineDetailDialog.vue
│ │ ├── JobLogDialog.vue
│ │ └── GroupSelector.vue
│ ├── pages/ # Route pages
│ │ ├── OverviewPage.vue
│ │ ├── ProjectsPage.vue
│ │ └── ContributorsPage.vue
│ └── types/ # TypeScript type definitions
├── docs/ # Documentation (this site)
├── .github/workflows/ # CI/CD workflows
├── CHANGELOG.md
├── README.md
└── RELEASING.md
Building from Source
CLI Application
cd src/cli
dotnet restore
dotnet build
# Run
dotnet run --project GitLabSummary -- --version
Dashboard
cd src/dashboard
npm install
npm run build
# Output in: dist/
Development Workflow
Backend Development (CLI)
Start Server
cd src/cli
dotnet run --project GitLabSummary -- serve --group YOUR-GROUP
Server runs on: http://localhost:5100
Make Changes
- Edit files in
GitLabSummary/ - Save (hot reload with
dotnet watch) - Test changes
Run Tests
cd src/cli
dotnet test
Frontend Development (Dashboard)
Terminal 1: Backend Server
cd src/cli
dotnet run --project GitLabSummary -- serve --group YOUR-GROUP
Terminal 2: Vue Dev Server
cd src/dashboard
npm run dev
Dev server runs on: http://localhost:3000
Proxies API requests to: http://localhost:5100
Features:
- Hot Module Replacement (HMR)
- Instant updates on file changes
- Vue DevTools integration
Make Changes
- Edit
.vueor.tsfiles - Save
- Browser auto-reloads
Linting
npm run lint # Check
npm run lint:fix # Fix
Testing
Backend Tests
cd src/cli
dotnet test
# With coverage
dotnet test --collect:"XPlat Code Coverage"
Frontend Tests
cd src/dashboard
npm run test
Manual Testing
Test CLI Commands:
# Token management
dotnet run --project GitLabSummary -- token set --url https://gitlab.com
dotnet run --project GitLabSummary -- token show
# Pipeline query
dotnet run --project GitLabSummary -- pipelines --group YOUR-GROUP --since 1h
# Dashboard
dotnet run --project GitLabSummary -- serve --group YOUR-GROUP --open
Test Dashboard Features:
- Navigate all pages
- Test AI analysis (if Copilot configured)
- Test group switching
- Test time period changes
- Test pipeline drill-down
Code Style
C# (.NET)
Follow Microsoft Conventions:
Use dotnet format:
cd src/cli
dotnet format
Key Conventions:
- PascalCase for public members
- camelCase for private fields
_prefix for private fieldsasyncsuffix for async methods- XML documentation for public APIs
Example:
public class GitLabApiClient
{
private readonly HttpClient _httpClient;
/// <summary>
/// Gets pipelines for the specified group.
/// </summary>
public async Task<IEnumerable<Pipeline>> GetPipelinesAsync(string groupId)
{
// Implementation
}
}
TypeScript/Vue
Follow Vue Style Guide:
Use ESLint and Prettier:
cd src/dashboard
npm run lint
npm run format
Key Conventions:
- PascalCase for components:
PipelineDetailDialog.vue - camelCase for functions/variables
- kebab-case for events:
@update-status - Composition API with
<script setup> - TypeScript for type safety
Example:
<script setup lang="ts">
import { ref, computed } from 'vue'
import type { Pipeline } from '@/types'
const props = defineProps<{
pipeline: Pipeline
}>()
const emit = defineEmits<{
close: []
refresh: []
}>()
const isOpen = ref(false)
</script>
Making Changes
Create Feature Branch
git checkout -b feature/your-feature-name
Branch naming:
feature/add-export-csv— New featuresfix/pipeline-sorting— Bug fixesdocs/api-reference— Documentationrefactor/api-client— Code refactoring
Make Commits
Commit Message Format:
type: brief description
Longer explanation if needed.
Fixes #123
Types:
feat:— New featurefix:— Bug fixdocs:— Documentationrefactor:— Code restructuringtest:— Test changeschore:— Build/tooling
Examples:
git commit -m "feat: add CSV export for pipelines
Adds new --export flag to pipelines command that outputs
results in CSV format for import into spreadsheets.
Fixes #123"
git commit -m "fix: resolve SSE disconnection issue
Dashboard now properly reconnects when connection drops.
Includes exponential backoff retry logic."
Run Tests
# Backend
cd src/cli && dotnet test
# Frontend
cd src/dashboard && npm run test && npm run lint
# Build dashboard
npm run build
Push and Create PR
git push origin feature/your-feature-name
On GitHub:
- Click “Create Pull Request”
- Fill in description:
- What changed
- Why it changed
- How to test
- Screenshots (if UI changes)
- Link related issues
- Request review
Debugging
Backend Debugging (VS Code)
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/src/cli/GitLabSummary/bin/Debug/net10.0/GitLabSummary.dll",
"args": ["serve", "--group", "YOUR-GROUP"],
"cwd": "${workspaceFolder}/src/cli/GitLabSummary",
"stopAtEntry": false,
"console": "internalConsole"
}
]
}
Usage:
- Set breakpoints in C# code
- Press F5
- Debug normally
Frontend Debugging
Browser DevTools:
F12 → Sources tab
Set breakpoints in TypeScript files
Vue DevTools:
- Install extension: https://devtools.vuejs.org
- Open Vue tab in DevTools
- Inspect component state, events, performance
Release Process
See RELEASING.md for complete release process.
Summary:
- Update version in
.csproj - Update
CHANGELOG.md - Create git tag
- Push tag
- GitHub Actions builds and publishes
- NuGet package published
- Executables created
- GitHub Release created
CI/CD
GitHub Actions Workflows
.github/workflows/build-test.yml:
- Runs on every push/PR
- Builds CLI and dashboard
- Runs tests
- Reports results
.github/workflows/release.yml:
- Runs on tag push (vX.Y.Z)
- Builds all platform executables
- Publishes to NuGet
- Creates GitHub Release
Local CI Simulation
# Install act (GitHub Actions locally)
brew install act # macOS
# or from: https://github.com/nektos/act
# Run workflow locally
cd gitlab-summary
act -j build
Documentation
Adding Documentation
Documentation lives in docs/learn/content/:
cd docs/learn/content/docs
# Create new page
echo "---
title: \"New Feature\"
description: \"Description\"
weight: 10
---
# New Feature
Content here..." > new-feature.md
Build Documentation Locally
cd docs/learn
hugo server -D
Open: http://localhost:1313
Getting Help
Questions
- GitHub Discussions: https://github.com/garrardkitchen/gitlab-summary/discussions
- Issues: https://github.com/garrardkitchen/gitlab-summary/issues
Review Process
- All PRs require review
- CI must pass
- Tests must pass
- Code style must be followed
See Also
- Troubleshooting — Common development issues
- Contributing Guidelines — Contribution guide
- Code of Conduct — Community guidelines