12ff74c4cb
Fixes a panic I got while viewing the branches in the UI. ``` runtime error: index out of range [0] with length 0 /home/gitpod/go/src/runtime/panic.go:113 (0x44053e) goPanicIndex: panic(boundsError{x: int64(x), signed: true, y: y, code: boundsIndex}) /workspace/woodpecker/server/remote/gitea/gitea.go:444 (0xd36764) (*Gitea).Branches.func1: result[i] = branches[i].Name /workspace/woodpecker/server/remote/common/utils.go:34 (0xd3942a) Paginate[...]: batch, err := get(page) /workspace/woodpecker/server/remote/gitea/gitea.go:439 (0xd36665) (*Gitea).Branches: branches, err := common.Paginate(func(page int) ([]string, error) { /workspace/woodpecker/server/api/repo.go:202 (0xc823a1) GetRepoBranches: branches, err := r.Branches(c, user, repo) /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xc71d44) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/session/repo.go:148 (0xc71bba) MustPull: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xc71aee) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/session/repo.go:139 (0xc71aaa) SetPerm.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xc71251) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/session/repo.go:53 (0xc710ec) SetRepo.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xccb50f) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/token/token.go:50 (0xccb248) Refresh: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xc721fc) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/session/user.go:72 (0xc721e3) SetUser.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xcd069e) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/store.go:29 (0xcd0685) Store.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xccff47) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/logger.go:23 (0xccff2a) Logger.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xccaf99) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/header/header.go:38 (0xccaec4) Options: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xccae21) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/middleware/header/header.go:30 (0xccae06) NoCache: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xccf32a) (*Context).Next: c.handlers[c.index](c) /workspace/woodpecker/server/router/router.go:39 (0xccf310) Load.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xa2e0c1) (*Context).Next: c.handlers[c.index](c) /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/recovery.go:101 (0xa2e0ac) CustomRecoveryWithWriter.func1: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 (0xa2cf30) (*Context).Next: c.handlers[c.index](c) /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 (0xa2cb98) (*Engine).handleHTTPRequest: c.Next() /workspace/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 (0xa2c6dc) (*Engine).ServeHTTP: engine.handleHTTPRequest(c) /home/gitpod/go/src/net/http/server.go:2947 (0x79cc4b) serverHandler.ServeHTTP: handler.ServeHTTP(rw, req) /home/gitpod/go/src/net/http/server.go:1991 (0x797e66) (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req) /home/gitpod/go/src/runtime/asm_amd64.s:1594 (0x476d80) goexit: BYTE $0x90 // NOP ``` Co-authored-by: Anbraten <anton@ju60.de> |
||
---|---|---|
.github | ||
.vscode | ||
.woodpecker | ||
agent | ||
charts | ||
cli | ||
cmd | ||
docker | ||
docs | ||
nfpm | ||
pipeline | ||
server | ||
shared | ||
version | ||
web | ||
woodpecker-go | ||
.changelog.yml | ||
.ecrc | ||
.editorconfig | ||
.gitignore | ||
.gitpod.yml | ||
.golangci.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
docker-compose.example.yml | ||
docker-compose.gitpod.yml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
SECURITY.md |
Woodpecker
Woodpecker is a community fork of the Drone CI system.
🫶 Support
Please consider to donate and become a backer. 🙏 [Become a backer]
🚀 Usage
.woodpecker.yml
- Place your pipeline in a file named
.woodpecker.yml
in your repository - Pipeline steps can be named as you like
- Run any command in the commands section
Build steps are containers
- Define any Docker image as context
- Install the needed tools in custom Docker images, use them as context
Plugins
Woodpecker has official plugins, but you can also use your own.
📖 Documentation
✨ Contribute
📣 Translate
We use an own Weblate instance at translate.woodpecker-ci.org.
👋 Who uses Woodpecker?
Codeberg, the Woodpecker project itself, and many others.
Leave a comment if you're using it as well.
Also consider using the topic WoodpeckerCI
in your repository, so others can learn from your config and use the hashtag #WoodpeckerCI
when talking about the project on social media!
Here are some places where people mention Woodpecker:
✨ Stars over time
License
Woodpecker is Apache 2.0 licensed with the source files in this repository having a header indicating which license they are under and what copyrights apply.
Files under the docs/
folder are licensed under Creative Commons Attribution-ShareAlike 4.0 International Public License.