Class: ActiveProject::Configurations::GithubConfiguration
- Inherits:
-
BaseAdapterConfiguration
- Object
- BaseAdapterConfiguration
- ActiveProject::Configurations::GithubConfiguration
- Defined in:
- lib/active_project/configurations/github_configuration.rb
Instance Attribute Summary collapse
-
#status_mappings ⇒ Object
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.
Attributes inherited from BaseAdapterConfiguration
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize(options = {}) ⇒ GithubConfiguration
constructor
A new instance of GithubConfiguration.
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( = {}) # Set up default status mappings before calling super @status_mappings = .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_mappings ⇒ Object
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
#freeze ⇒ Object
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 |