2
0
Fork
You've already forked plugin-lib
0
Crow CI plugin library
Go 97.9%
Just 2.1%
crowci-bot 712a8f09b8
All checks were successful
ci/crow/push/changelog Pipeline was successful
ci/crow/push/lint Pipeline was successful
chore(deps): update pre-commit hook adrienverge/yamllint to v1.38.0
2026年01月14日 00:41:11 +00:00
.crow ci: add CGO support 2025年12月29日 15:33:02 +01:00
.gitsv chore: add changelog workflow 2025年12月29日 15:07:06 +01:00
cli feat: add custom cli flags ( #48 ) 2025年04月23日 18:01:11 +00:00
.editorconfig refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
.editorconfig-checker.json refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
.gitignore ci: add CGO support 2025年12月29日 15:33:02 +01:00
.golangci.yaml chore: install golangci-lint binary, address lints 2025年12月29日 15:23:30 +01:00
.markdownlint.yaml refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
.pre-commit-config.yaml chore(deps): update pre-commit hook adrienverge/yamllint to v1.38.0 2026年01月14日 00:41:11 +00:00
.prettierrc.json refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
.yamllint.yaml refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
commit.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
flags.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
forge.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
go.mod chore(deps): update module golang.org/x/net to v0.49.0 2026年01月13日 00:41:22 +00:00
go.sum chore(deps): update module golang.org/x/net to v0.49.0 2026年01月13日 00:41:22 +00:00
http.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
Justfile refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
LICENSE refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
logger.go fix: return error from SetupConsoleLogger instead of calling log.Fatal 2025年12月29日 16:17:52 +01:00
metadata.go feat: add IsPullRequest helper method to Metadata 2025年12月29日 16:20:22 +01:00
metadata_test.go test: add tests for IsPullRequest and invalid pipeline files 2025年12月29日 19:13:15 +01:00
pipeline.go fix: log warning instead of os.Exit on CI_PIPELINE_FILES parse failure 2025年12月29日 16:18:40 +01:00
plugin.go feat: add Logger method to expose configured zerolog logger 2025年12月29日 19:14:07 +01:00
plugin_test.go test: add tests for HTTPClient and Logger accessor methods 2025年12月29日 19:15:24 +01:00
README.md chore: rename to plugin-lib 2025年10月25日 15:57:05 +02:00
renovate.json ci: fix renovate config 2025年12月29日 15:07:42 +01:00
repo.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
step.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00
system.go refactor: rebrand/refactor to Crow 2025年10月25日 15:20:44 +02:00

Library for creating Crow CI plugins

Provides basic structure and helpers to load Crow CI environment variables while also supporting reading Drone CI environment variables where available.

Adds logging support based on zerolog library and allows configurable HTTP client library.

Builtin settings

Settings Name Environment variable Default Description
log_level - info Sets log level (panic, fatal, error, warn, info, debug, trace)
skip_verify - false - Skip verification of TLS certificate
SOCKS_PROXY none SOCKS5 proxy to use for connections
SOCKS_PROXY_OFF none Do not use SOCKS5 proxy

Creating plugin

packagemainimport("context""codeberg.org/crow-plugins/plugin-lib""github.com/rs/zerolog/log""github.com/urfave/cli/v3")typeSettingsstruct{// TODO: Plugin settingsSampleFlagstring}typePluginstruct{*plugin.PluginSettings*Settings}func(p*Plugin)Flags()[]cli.Flag{return[]cli.Flag{// TODO: Add flags&cli.StringFlag{Name:"sample.flag",Usage:"sample flag",Sources:cli.EnvVars("PLUGIN_SAMPLE_FLAG"),Destination:&p.Settings.SampleFlag,},}}func(p*Plugin)Execute(ctxcontext.Context)error{// TODO: Implement executionlog.Debug().Msg("executed")returnnil}funcmain(){p:=&Plugin{Settings:&Settings{},}p.Plugin=plugin.New(plugin.Options{Name:"sample-plugin",Description:"Sample plugin",Flags:p.Flags(),Execute:p.Execute,})p.Run()}