You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-06-24 22:06:51 +02:00
Add repo branches endpoint (#481)
* add repo branches endpoint * add branches func to remotes
This commit is contained in:
@ -276,6 +276,12 @@ func (c *Coding) Deactivate(ctx context.Context, u *model.User, r *model.Repo, l
|
||||
return c.newClient(ctx, u).RemoveWebhook(r.Owner, r.Name, link)
|
||||
}
|
||||
|
||||
// Branches returns the names of all branches for the named repository.
|
||||
func (c *Coding) Branches(ctx context.Context, u *model.User, r *model.Repo) ([]string, error) {
|
||||
// TODO: fetch all branches
|
||||
return []string{r.Branch}, nil
|
||||
}
|
||||
|
||||
// Hook parses the post-commit hook from the Request body and returns the
|
||||
// required data in a standard format.
|
||||
func (c *Coding) Hook(r *http.Request) (*model.Repo, *model.Build, error) {
|
||||
|
Reference in New Issue
Block a user