Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]

permissions:
contents: read

env:
GOFLAGS: -buildvcs=false
GOWORK: "off"
GOPROXY: "direct"
GOSUMDB: "off"

jobs:
test:
name: Test + Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test with coverage
working-directory: go
run: go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: go/coverage.out
flags: unittests
fail_ci_if_error: false

lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- uses: golangci/golangci-lint-action@v9
with:
version: latest
working-directory: go
args: --timeout=5m --tests=false

sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Test for coverage
working-directory: go
run: go test -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=dappcore
-Dsonar.projectKey=dappcore_go-scm
-Dsonar.sources=go
-Dsonar.exclusions=**/vendor/**,**/third_party/**,**/.tmp/**,**/*_test.go
-Dsonar.tests=go
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.go.coverage.reportPaths=go/coverage.out
20 changes: 20 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[submodule "external/go"]
path = external/go
url = https://github.com/dappcore/go.git
branch = dev
[submodule "external/config"]
path = external/config
url = https://github.com/dappcore/config.git
branch = dev
[submodule "external/io"]
path = external/io
url = https://github.com/dappcore/go-io.git
branch = dev
[submodule "external/ws"]
path = external/ws
url = https://github.com/dappcore/go-ws.git
branch = dev
[submodule "external/log"]
path = external/log
url = https://github.com/dappcore/go-log.git
branch = dev
4 changes: 2 additions & 2 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
GOFLAGS: -buildvcs=false
GOWORK: "off"
commands:
- golangci-lint run --timeout=5m ./...
- cd go && golangci-lint run --timeout=5m ./...

- name: go-test
image: golang:1.26-alpine
Expand All @@ -25,7 +25,7 @@ steps:
CGO_ENABLED: "1"
commands:
- apk add --no-cache git build-base
- go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- cd go && go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: sonar
image: sonarsource/sonar-scanner-cli:latest
depends_on: [go-test]
Expand Down
47 changes: 47 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# CLAUDE.md

This file provides guidance for agents working in this repository.

## Project Overview

This repository contains the Go module for `dappco.re/go/scm`.

## Repo Layout

Go module files and all Go packages now live under `go/`.

```text
go-scm/
├── go/
│ ├── go.mod
│ ├── go.sum
│ ├── scm.go
│ ├── scm_test.go
│ ├── agentci/
│ ├── cmd/
│ ├── collect/
│ ├── core/
│ ├── forge/
│ ├── git/
│ ├── gitea/
│ ├── internal/
│ ├── jobrunner/
│ ├── manifest/
│ ├── marketplace/
│ ├── pkg/
│ ├── plugin/
│ ├── repos/
│ ├── tests/
│ ├── third_party/
│ ├── README.md (symlink when present at repo root)
│ ├── CLAUDE.md (symlink when present at repo root)
│ └── AGENTS.md (symlink when present at repo root)
├── .woodpecker.yml
└── sonar-project.properties
```

All Go-related checks, tooling, and package commands should be run from
`go/` (for example `cd go && go test ./...`, `cd go && go mod tidy`).

For repository docs layout, keep cross-language files at the repo root and
gate them into `go/` via symlinks when they exist.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- SPDX-License-Identifier: EUPL-1.2 -->



> SCM façade — forge/gitea/forgejo, marketplace, manifest, plugin runner

[![CI](https://github.com/dappcore/go-scm/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/dappcore/go-scm/actions/workflows/ci.yml)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-scm&metric=alert_status)](https://sonarcloud.io/dashboard?id=dappcore_go-scm)
[![Coverage](https://codecov.io/gh/dappcore/go-scm/branch/dev/graph/badge.svg)](https://codecov.io/gh/dappcore/go-scm)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-scm&metric=security_rating)](https://sonarcloud.io/dashboard?id=dappcore_go-scm)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-scm&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=dappcore_go-scm)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-scm&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=dappcore_go-scm)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-scm&metric=code_smells)](https://sonarcloud.io/dashboard?id=dappcore_go-scm)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dappcore_go-scm&metric=ncloc)](https://sonarcloud.io/dashboard?id=dappcore_go-scm)
[![Go Reference](https://pkg.go.dev/badge/dappco.re/go/go-scm.svg)](https://pkg.go.dev/dappco.re/go/go-scm)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://eupl.eu/1.2/en/)


147 changes: 0 additions & 147 deletions collect/excavate.go

This file was deleted.

1 change: 1 addition & 0 deletions external/config
Submodule config added at aba665
1 change: 1 addition & 0 deletions external/go
Submodule go added at d661b7
1 change: 1 addition & 0 deletions external/io
Submodule io added at 789653
1 change: 1 addition & 0 deletions external/log
Submodule log added at df0529
1 change: 1 addition & 0 deletions external/ws
Submodule ws added at c83f7a
13 changes: 13 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
go 1.26.2

// Workspace mode for development: pulls fresh code from external/ submodules.
// CI uses GOWORK=off to fall back to go/go.mod tags (reproducible).

use (
./go
./external/go
./external/config
./external/io
./external/ws
./external/log
)
1 change: 1 addition & 0 deletions go/CLAUDE.md
Loading
Loading