mirror of
https://github.com/zjdyzww/harness.git
synced 2026-09-29 17:08:13 +08:00
* 40276a Refactor to use GitOpTypeAPIContent where appropriate * ac23b8 Merge remote-tracking branch 'origin' into dd/githook-op-type * 579458 Add new type GitOpTypeManageRepo * 6148a9 Exit early in pre receive for api refs only and sync linked ops * ab2255 Merge remote-tracking branch 'origin' into dd/githook-op-type * fc709b Refactor op types to better capture the real semantics of the respective git op * 50ad8b Merge remote-tracking branch 'origin' into dd/githook-op-type * ca7c17 Remove code duplication by creating CreateWriteParamsForOperation * 1a2612 Add GithookOpTypeAPILinkedSync enum type * 42da1b Add enum.GithookOpTypeAPISystemRefs * e07d1b Merge remote-tracking branch 'origin' into dd/githook-op-type * c9f579 Remove githook.GenerateEnvironmentVariables and replace it with githook.GenerateEnvironmentVariablesForOperation * b3d60d Merge remote-tracking branch 'origin' into dd/githook-op-type * 8412d1 Remove op type IsAPI() helper * 5980ce Merge remote-tracking br
47 lines
1.4 KiB
Go
47 lines
1.4 KiB
Go
// Copyright 2023 Harness, Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package types
|
|
|
|
import (
|
|
"github.com/harness/gitness/git/hook"
|
|
"github.com/harness/gitness/types/enum"
|
|
)
|
|
|
|
// GithookInputBase contains the base input of the githook apis.
|
|
type GithookInputBase struct {
|
|
RepoID int64
|
|
PrincipalID int64
|
|
Internal bool // Deprecated: Use OperationType instead
|
|
OperationType enum.GitOpType
|
|
}
|
|
|
|
// GithookPreReceiveInput is the input for the pre-receive githook api call.
|
|
type GithookPreReceiveInput struct {
|
|
GithookInputBase
|
|
hook.PreReceiveInput
|
|
}
|
|
|
|
// GithookUpdateInput is the input for the update githook api call.
|
|
type GithookUpdateInput struct {
|
|
GithookInputBase
|
|
hook.UpdateInput
|
|
}
|
|
|
|
// GithookPostReceiveInput is the input for the post-receive githook api call.
|
|
type GithookPostReceiveInput struct {
|
|
GithookInputBase
|
|
hook.PostReceiveInput
|
|
}
|