arcade-mcp/toolkits/github/arcade_github/tools/models.py
Eric Gustin 7e352fbe91
Add Github Toolkit (#75)
### Adds the following tools to the Github Toolkit:

    1.	CreateIssueComment
	2.	SetStarred
	3.	CountStargazers
	4.	ListOrgRepositories
	5.	GetRepository
	6.	ListRepositoryActivities
	7.	ListReviewCommentsInARepository
	8.	ListPullRequests
	9.	GetPullRequest
	10.	UpdatePullRequest
	11.	ListPullRequestCommits
	12.	CreateReplyForReviewComment
	13.	ListReviewCommentsOnPullRequest
	14.	CreateReviewComment



Adds evals for all of these tools and unit tests.

---------

Co-authored-by: Sam Partee <sam@arcade-ai.com>
2024-10-02 10:40:17 -07:00

98 lines
2 KiB
Python

from enum import Enum
# Pull Request specific
class PRSortProperty(str, Enum):
CREATED = "created"
UPDATED = "updated"
POPULARITY = "popularity"
LONG_RUNNING = "long-running"
class PRState(str, Enum):
OPEN = "open"
CLOSED = "closed"
ALL = "all"
class ReviewCommentSortProperty(str, Enum):
CREATED = "created"
UPDATED = "updated"
class ReviewCommentSubjectType(str, Enum):
FILE = "file"
LINE = "line"
class DiffSide(str, Enum):
"""
The side of the diff that the pull request's changes appear on.
Use LEFT for deletions that appear in red.
Use RIGHT for additions that appear in green or unchanged lines that appear in white and are shown for context
"""
LEFT = "LEFT"
RIGHT = "RIGHT"
# Repo specific
class RepoType(str, Enum):
"""
The types of repositories you want returned when listing organization repositories.
Default is all repositories.
"""
ALL = "all"
PUBLIC = "public"
PRIVATE = "private"
FORKS = "forks"
SOURCES = "sources"
MEMBER = "member"
class RepoSortProperty(str, Enum):
"""
The property to sort the results by when listing organization repositories.
Default is created.
"""
CREATED = "created"
UPDATED = "updated"
PUSHED = "pushed"
FULL_NAME = "full_name"
class RepoTimePeriod(str, Enum):
"""
The time period to filter by when listing repository activities.
"""
DAY = "day"
WEEK = "week"
MONTH = "month"
QUARTER = "quarter"
YEAR = "year"
class ActivityType(str, Enum):
"""
The activity type to filter by when listing repository activities.
"""
PUSH = "push"
FORCE_PUSH = "force_push"
BRANCH_CREATION = "branch_creation"
BRANCH_DELETION = "branch_deletion"
PR_MERGE = "pr_merge"
MERGE_QUEUE_MERGE = "merge_queue_merge"
class SortDirection(str, Enum):
"""
The order to sort by when listing organization repositories.
Default is asc.
"""
ASC = "asc"
DESC = "desc"