REST Resource: projects.locations.repositories.hooks

Resource: Hook

Metadata of a Secure Source Manager Hook.

JSON representation
{
  "name": string,
  "targetUri": string,
  "disabled": boolean,
  "events": [
    enum (HookEventType)
  ],
  "createTime": string,
  "updateTime": string,
  "uid": string,
  "pushOption": {
    object (PushOption)
  },
  "sensitiveQueryString": string
}
Fields
name

string

Identifier. A unique identifier for a Hook. The name should be of the format: projects/{project}/locations/{locationId}/repositories/{repositoryId}/hooks/{hookId}

targetUri

string

Required. The target URI to which the payloads will be delivered.

disabled

boolean

Optional. Determines if the hook disabled or not. Set to true to stop sending traffic.

events[]

enum (HookEventType)

Optional. The events that trigger hook on.

createTime

string (Timestamp format)

Output only. Create timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Update timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

uid

string

Output only. Unique identifier of the hook.

pushOption

object (PushOption)

Optional. The trigger option for push events.

sensitiveQueryString

string

Optional. The sensitive query string to be appended to the target URI.

HookEventType

Enums
UNSPECIFIED Unspecified.
PUSH Push events are triggered when pushing to the repository.
PULL_REQUEST Pull request events are triggered when a pull request is opened, closed, reopened, or edited.

PushOption

JSON representation
{
  "branchFilter": string
}
Fields
branchFilter

string

Optional. Trigger hook for matching branches only. Specified as glob pattern. If empty or , events for all branches are reported. Examples: main, {main,release}. See https://pkg.go.dev/github.com/gobwas/glob documentation.

Methods

create

Creates a new hook in a given repository.

delete

Deletes a Hook.

get

Gets metadata of a hook.

list

Lists hooks in a given repository.

patch

Updates the metadata of a hook.