Class GitLabBotIdentityResolver
java.lang.Object
io.agentscope.extensions.channel.gitlab.GitLabBotIdentityResolver
Resolves the bot's GitLab user id (and username) for the configured token by calling
GET /user. Used for bot-loop self-detection — when a Note Hook is fired by the bot
itself, the channel must drop it to avoid infinite loops.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the bot's numeric user id, or-1if unresolved.Returns the bot's username, or null if unresolved.voidrefresh()Synchronously attempts to resolveGET /userand cache the response.
-
Constructor Details
-
GitLabBotIdentityResolver
-
-
Method Details
-
refresh
public void refresh()Synchronously attempts to resolveGET /userand cache the response. Errors are logged at WARN; startup continues. -
botUserId
public long botUserId()Returns the bot's numeric user id, or-1if unresolved. -
botUsername
Returns the bot's username, or null if unresolved.
-