Record Class GitHubChannelProperties

java.lang.Object
java.lang.Record
io.agentscope.extensions.channel.github.GitHubChannelProperties
Record Components:
token - Personal Access Token (PAT, fine-grained or classic) used for the REST API outbound and bot-identity lookup. Required.
webhookSecret - shared secret configured on the webhook; used to verify X-Hub-Signature-256. Required.
apiBase - override for the GitHub REST API base; defaults to https://api.github.com (set to https://github.your-corp.com/api/v3 for GitHub Enterprise Server)
webhookPath - HTTP path Spring exposes the webhook under; defaults to /api/channels/github/{channelId}/webhook
botUserLogin - optional override for the bot account's login (e.g. my-bot). When unset, the channel resolves the login automatically via GET /user at startup.

public record GitHubChannelProperties(String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin) extends Record
Provider-specific configuration for a single GitHub channel instance, sourced from the properties block of channels.<id> in agentscope.json.
  • Constructor Details

    • GitHubChannelProperties

      public GitHubChannelProperties(String token, String webhookSecret, String apiBase, String webhookPath, String botUserLogin)
      Creates an instance of a GitHubChannelProperties record class.
      Parameters:
      token - the value for the token record component
      webhookSecret - the value for the webhookSecret record component
      apiBase - the value for the apiBase record component
      webhookPath - the value for the webhookPath record component
      botUserLogin - the value for the botUserLogin record component
  • Method Details

    • from

      public static GitHubChannelProperties from(String channelId, Map<String,Object> props)
      Reads a GitHubChannelProperties from an arbitrary properties map.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • token

      public String token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • webhookSecret

      public String webhookSecret()
      Returns the value of the webhookSecret record component.
      Returns:
      the value of the webhookSecret record component
    • apiBase

      public String apiBase()
      Returns the value of the apiBase record component.
      Returns:
      the value of the apiBase record component
    • webhookPath

      public String webhookPath()
      Returns the value of the webhookPath record component.
      Returns:
      the value of the webhookPath record component
    • botUserLogin

      public String botUserLogin()
      Returns the value of the botUserLogin record component.
      Returns:
      the value of the botUserLogin record component