Add github actions to comment on an issue or read the content

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-03-13 22:17:44 +01:00
parent 26bcdf72a2
commit a1cdabd0a8
3 changed files with 212 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ const (
ActionGithubIssueSearcher = "github-issue-searcher"
ActionGithubRepositoryGet = "github-repository-get-content"
ActionGithubRepositoryCreateOrUpdate = "github-repository-create-or-update-content"
ActionGithubIssueReader = "github-issue-reader"
ActionGithubIssueCommenter = "github-issue-commenter"
ActionScraper = "scraper"
ActionWikipedia = "wikipedia"
ActionBrowse = "browse"
@@ -39,6 +41,8 @@ var AvailableActions = []string{
ActionGithubIssueSearcher,
ActionGithubRepositoryGet,
ActionGithubRepositoryCreateOrUpdate,
ActionGithubIssueReader,
ActionGithubIssueCommenter,
ActionScraper,
ActionBrowse,
ActionWikipedia,
@@ -78,6 +82,10 @@ func Actions(a *state.AgentConfig) func(ctx context.Context) []agent.Action {
allActions = append(allActions, actions.NewGithubIssueCloser(ctx, config))
case ActionGithubIssueSearcher:
allActions = append(allActions, actions.NewGithubIssueSearch(ctx, config))
case ActionGithubIssueReader:
allActions = append(allActions, actions.NewGithubIssueReader(ctx, config))
case ActionGithubIssueCommenter:
allActions = append(allActions, actions.NewGithubIssueCommenter(ctx, config))
case ActionGithubRepositoryGet:
allActions = append(allActions, actions.NewGithubRepositoryGetContent(ctx, config))
case ActionGithubRepositoryCreateOrUpdate: