Allow to define default branches#125
No reviewers
Labels
No labels
breaking
bug
build_pr_image
documentation
d̶u̶p̶l̶i̶c̶a̶t̶e̶
feature
good first issue
improvement
i̶n̶v̶a̶l̶i̶d̶
open questions
performance
refactor
research required
No project
No assignees
2 participants Notifications
Due date No due date set.
Depends on
#106 switch to std http implementation instead of fasthttp
Codeberg/pages-server
Reference
Codeberg/pages-server!125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "deblan/pages-server:issue115"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is a POC for #115 (comment: #115 (comment))
WIP: (POC) Allow to define default branchesto (POC) Allow to define default branches@ -48,6 +48,7 @@ func Serve(ctx *cli.Context) error {giteaAPIToken := ctx.String("gitea-api-token")rawDomain := ctx.String("raw-domain")mainDomainSuffix := []byte(ctx.String("pages-domain"))defaultBranches := strings.Split(strings.ReplaceAll(ctx.String("pages-branches"), " ", ""), ",")just use ctx.StringSlice() & and cli.StringSliceFlag
(POC) Allow to define default branchesto Allow to define default branchesI'll resolve conflicts and merge it once #106 got merged
@deblan ok I fixed all conflicts, can you look if I missed something or if now it does not work as you thought ...
... I'll review it later once v4.0 release is done and is out in the wild for a short time to make sure there are no regressions :)
Something does not work as expected. I'm debbuging it!
@ -93,2 +110,2 @@TargetBranch: defaultPagesBranch,TargetPath: path.Join(pathElements[1:]...),TargetRepo: defaultPagesRepo,TargetBranch: branch,that's a breaking change witch would make a lot of pages unusable:
...
just to name some
tldr: defaultPagesRepo dont need "defaultPagesBranch" it just uses the default branch of the repo aka. branch=""
well it's not as its covered below the loop
Add "main" in
PAGES_BRANCHES(or as value ofpages-branch) in and it will work painless:This exaclty the goal of this PR ;)
Well but that would break non pages repo with main branch ... as these would also be served then
We can imagine à specific behavior for repos named
pagesby automatically allowmainandmaster.