Class: Cerbos::Hub::Stores::Input::ChangeDetails::Origin::Git

Inherits:
Cerbos::Hub::Stores::Input::ChangeDetails::Origin show all
Defined in:
lib/cerbos/hub/stores/input/change_details/origin.rb

Overview

Details of a change made to a store when syncing it with a Git repository.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo: "", ref: "", hash: "", message: "", committer: "", commit_date: nil, author: "", author_date: nil) ⇒ Git

Specify details of a change made to a store when syncing it with a Git repository.

Parameters:

  • repo (String) (defaults to: "")

    the Git repository with which the store was synced.

  • ref (String) (defaults to: "")

    the Git ref with which the store was synced.

  • hash (String) (defaults to: "")

    the hash of the commit with which the store was synced.

  • message (String) (defaults to: "")

    the message of the commit with which the store was synced.

  • committer (String) (defaults to: "")

    the committer of the commit with which the store was synced.

  • commit_date (Time, nil) (defaults to: nil)

    the commit date of the commit with which the store was synced.

  • author (String) (defaults to: "")

    the author of the commit with which the store was synced.

  • author_date (Time, nil) (defaults to: nil)

    the author date of the commit with which the store was synced.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 68

def initialize(
  repo: "",
  ref: "",
  hash: "",
  message: "",
  committer: "",
  commit_date: nil,
  author: "",
  author_date: nil
)
  @repo = repo
  @ref = ref
  @hash = hash
  @message = message
  @committer = committer
  @commit_date = commit_date
  @author = author
  @author_date = author_date
end

Instance Attribute Details

#authorString (readonly)

The author of the commit with which the store was synced.

Returns:

  • (String)


50
51
52
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 50

def author
  @author
end

#author_dateTime? (readonly)

The author date of the commit with which the store was synced.

Returns:

  • (Time)
  • (nil)

    if not provided



56
57
58
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 56

def author_date
  @author_date
end

#commit_dateTime? (readonly)

The commit date of the commit with which the store was synced.

Returns:

  • (Time)
  • (nil)

    if not provided



45
46
47
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 45

def commit_date
  @commit_date
end

#committerString (readonly)

The committer of the commit with which the store was synced.

Returns:

  • (String)


39
40
41
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 39

def committer
  @committer
end

#hashString (readonly)

The hash of the commit with which the store was synced.

Returns:

  • (String)


29
30
31
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 29

def hash
  @hash
end

#messageString (readonly)

The message of the commit with which the store was synced.

Returns:

  • (String)


34
35
36
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 34

def message
  @message
end

#refString (readonly)

The Git ref with which the store was synced.

Returns:

  • (String)


24
25
26
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 24

def ref
  @ref
end

#repoString (readonly)

The Git repository with which the store was synced.

Returns:

  • (String)


19
20
21
# File 'lib/cerbos/hub/stores/input/change_details/origin.rb', line 19

def repo
  @repo
end