mergerequest

package
v0.0.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMergeRequestProposalID

func MakeMergeRequestProposalID(id interface{}) string

MakeMergeRequestProposalID returns the full proposal ID of a given merge request ID

Types

type Contract

type Contract struct {
	core.Keepers
	// contains filtered or unexported fields
}

MergeRequestContract is a system contract that creates a merge request proposal. MergeRequestContract implements core.SystemContract.

func NewContract

func NewContract(mergeData *Data) *Contract

NewContract creates a new instance of MergeRequestContract

func (*Contract) CanExec

func (c *Contract) CanExec(typ types.TxCode) bool

func (*Contract) Exec

func (c *Contract) Exec() error

Exec executes the contract

func (*Contract) Init

func (c *Contract) Init(logic core.Keepers, tx types.BaseTx, curChainHeight uint64) core.SystemContract

Init initialize the contract

type Data

type Data struct {

	// RepoName is the target repo
	RepoName string

	// ProposalID is the unique proposal ID
	ProposalID string

	// ProposerFee is the amount to pay as proposal fee
	ProposerFee util.String

	// Fee is the network fee
	Fee util.String

	// CreatorAddress is the address of the proposal creator
	CreatorAddress identifier.Address

	// BaseBranch is the destination branch name
	BaseBranch string

	// BaseBranchHash is the destination branch current hash
	BaseBranchHash string

	// TargetBranch is the name of the source branch
	TargetBranch string

	// TargetBranchHash is the hash of the source branch
	TargetBranchHash string

	// repo is the target repository state
	Repo *state.Repository
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL