Class: ActiveProject::Configurations::GithubConfiguration

Inherits:
BaseAdapterConfiguration show all
Defined in:
lib/active_project/configurations/github_configuration.rb

Instance Attribute Summary collapse

Attributes inherited from BaseAdapterConfiguration

#options

Instance Method Summary collapse

Methods inherited from BaseAdapterConfiguration

#method_missing, #respond_to_missing?, #retry_options

Constructor Details

#initialize(options = {}) ⇒ GithubConfiguration

Returns a new instance of GithubConfiguration.



18
19
20
21
22
23
24
25
# File 'lib/active_project/configurations/github_configuration.rb', line 18

def initialize(options = {})
  # Set up default status mappings before calling super
  @status_mappings = options.delete(:status_mappings) || {
    "open" => :open,
    "closed" => :closed
  }
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveProject::Configurations::BaseAdapterConfiguration

Instance Attribute Details

#status_mappingsObject

expected options: :access_token – PAT or GitHub App installation token :owner – user/org login the adapter should default to (optional for github_project) :repo – repository name (required for github_repo adapter) optional: :status_mappings – Maps GitHub project status names to normalized symbols

Example: { "Todo" => :open, "In Progress" => :in_progress, "Blocked" => :blocked, "Done" => :closed }
Supports: :open, :in_progress, :blocked, :on_hold, :closed

:webhook_secret – For webhook signature verification



16
17
18
# File 'lib/active_project/configurations/github_configuration.rb', line 16

def status_mappings
  @status_mappings
end

Instance Method Details

#freezeObject



27
28
29
30
31
# File 'lib/active_project/configurations/github_configuration.rb', line 27

def freeze
  # Ensure nested hashes are also frozen
  @status_mappings.freeze
  super
end