// Copyright 2026 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT // Package stack holds the data types shared between the pull request stack API // client (modules/task) and its output formatting (modules/print). package stack // Entry is one pull request participating in a pull request stack. type Entry struct { PullID int64 `json:"pull_id"` ParentPullID int64 `json:"parent_pull_id"` Position int `json:"position"` State string `json:"state"` LastRestackedSHA string `json:"last_restacked_sha"` } // Stack is a same-repository chain of pull requests, bottom first. type Stack struct { ID int64 `json:"id"` RepoID int64 `json:"repo_id"` OwnerID int64 `json:"owner_id"` Title string `json:"title"` BaseBranch string `json:"base_branch"` State string `json:"state"` AutoRestack bool `json:"auto_restack"` Entries []Entry `json:"entries"` } // MergeResult reports how many pull requests of a stack were merged. type MergeResult struct { Merged int64 `json:"merged"` Error string `json:"error,omitempty"` }