Class: Relay::Forms::MCP::GitHub
- Inherits:
-
Relay::Forms::MCP
- Object
- Relay::Forms::MCP
- Relay::Forms::MCP::GitHub
- Defined in:
- app/forms/mcp/github.rb
Overview
The GitHub class represents form state for Relay’s GitHub MCP preset.
Instance Attribute Summary collapse
-
#token ⇒ String
readonly
Returns the GitHub bearer token without the ‘Bearer ` prefix.
Attributes inherited from Relay::Forms::MCP
Instance Method Summary collapse
-
#data ⇒ Hash
Returns the preset-specific MCP data overrides.
- #initialize(token: "", **attributes) ⇒ Relay::Forms::MCP::GitHub constructor
-
#preset ⇒ String
Returns the preset id.
-
#transport ⇒ String
Returns the backing MCP transport.
Methods inherited from Relay::Forms::MCP
build, from_model, from_params, #persisted?
Constructor Details
#initialize(token: "", **attributes) ⇒ Relay::Forms::MCP::GitHub
17 18 19 20 |
# File 'app/forms/mcp/github.rb', line 17 def initialize(token: "", **attributes) super(**attributes) @token = token.to_s.strip end |
Instance Attribute Details
#token ⇒ String (readonly)
Returns the GitHub bearer token without the ‘Bearer ` prefix
11 12 13 |
# File 'app/forms/mcp/github.rb', line 11 def token @token end |
Instance Method Details
#data ⇒ Hash
Returns the preset-specific MCP data overrides
39 40 41 42 43 44 45 |
# File 'app/forms/mcp/github.rb', line 39 def data { "headers" => { "Authorization" => "Bearer #{token}" } } end |
#preset ⇒ String
Returns the preset id
25 26 27 |
# File 'app/forms/mcp/github.rb', line 25 def preset "github" end |
#transport ⇒ String
Returns the backing MCP transport
32 33 34 |
# File 'app/forms/mcp/github.rb', line 32 def transport "http" end |