f627219ca8
Universal: Auto Version Bump / Version Bump (push) Successful in 19s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
PR RC Release / Build RC Release (pull_request) Successful in 4s
Universal: PR Check / Validate PR (pull_request) Failing after 9s
Generic: Project CI / Lint & Validate (pull_request) Successful in 30s
Universal: PR Check / Secret Scan (pull_request) Successful in 1m7s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Adds configurable cascade rules per repo. When a PR merges into a
source branch, the system auto-creates PRs to each configured target
branch. Skips if a matching PR already exists.
- Model: CascadeMergeRule (repo_id, source, target, enabled, auto_merge)
- Migration v362 creates cascade_merge_rule table
- Notifier hooks into MergePullRequest/AutoMergePullRequest events
- API: CRUD at /repos/{owner}/{repo}/cascade_rules (admin only)
Claude-Session: https://claude.ai/code/session_011AAFzotGMf3ayvXhEmStCd
34 lines
1.1 KiB
Go
34 lines
1.1 KiB
Go
// Copyright 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package structs
|
|
|
|
import "time"
|
|
|
|
// CascadeMergeRule represents a cascade merge rule
|
|
type CascadeMergeRule struct {
|
|
ID int64 `json:"id"`
|
|
SourceBranch string `json:"source_branch"`
|
|
TargetBranch string `json:"target_branch"`
|
|
Enabled bool `json:"enabled"`
|
|
AutoMerge bool `json:"auto_merge"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// CreateCascadeMergeRuleOption options for creating a cascade merge rule
|
|
type CreateCascadeMergeRuleOption struct {
|
|
SourceBranch string `json:"source_branch" binding:"Required"`
|
|
TargetBranch string `json:"target_branch" binding:"Required"`
|
|
Enabled *bool `json:"enabled"`
|
|
AutoMerge *bool `json:"auto_merge"`
|
|
}
|
|
|
|
// EditCascadeMergeRuleOption options for editing a cascade merge rule
|
|
type EditCascadeMergeRuleOption struct {
|
|
SourceBranch *string `json:"source_branch"`
|
|
TargetBranch *string `json:"target_branch"`
|
|
Enabled *bool `json:"enabled"`
|
|
AutoMerge *bool `json:"auto_merge"`
|
|
}
|