Repository Data Model
In the Repository Data Model, the provider models each repository associated with the authenticated account as a schema. Live connectivity to these objects means that any changes to your GitHub account are immediately reflected in the provider.
Tables
The Tables section, which details standard SQL tables, contains samples of what you might have access to in your GitHub account.
The following tables are shipped with the provider:
| Name | Description |
| Branches | Contains detailed information about branches in a repository, including branch names and their relationships with other branches for version control. |
| Commits | Contains metadata for commits in a repository, including author information, timestamps, and commit messages for version tracking. |
| Environments | Lists deployment environments configured for a repository, including environment names, statuses, and related configuration data. |
| Invitations | List and manage invitations to collaborate on the repository. |
| IssueComments | Logs comments added to issues, capturing discussions, updates, and resolutions for tracking purposes. |
| Issues | Stores comprehensive details about issues in a repository, including labels, assignees, priorities, and statuses. |
| Labels | Maintains a catalog of labels available in a repository, enabling effective categorization and filtering of issues and pull requests. |
| PullRequestReviewRequests | Tracks requests for reviews on pull requests, including information about requested reviewers and their response statuses. |
| PullRequests | Contains metadata about pull requests in a repository, such as their titles, descriptions, current statuses, and authors, to manage proposed changes effectively. |
| Releases | Tracks versioned releases in a repository, detailing associated tags, descriptions, and links to attached assets. |
Views
The Views section, which lists read-only SQL tables, contains samples of what you might have access to in your GitHub account.
The following views are shipped with the provider:
| Name | Description |
| AssignableUsers | Identifies users who are eligible to be assigned to repository issues, based on their roles and permissions. |
| Collaborators | Lists collaborators in a repository, including their roles, permissions, and contributions to the project. |
| CommitComments | Tracks comments made on specific commits, providing insights into discussions and feedback related to code changes. |
| CommitCompare | Stores a detailed list of commits generated from a comparison of two references, such as branches or tags. |
| CommitCompareFiles | Tracks files modified during a comparison between two references, providing details on up to 300 changed files for review. |
| CommitFiles | Details files modified in specific commits, including filenames, change types (for example, added, deleted, modified), and related metadata. |
| Forks | Provides metadata about forks created from a repository, including fork ownership and purpose, to support collaboration and innovation. |
| IssueAssignedActors | Lists information about the assigned actors to the repository's issues. |
| IssueAssignees | Tracks users assigned to issues within a repository, detailing responsibilities and roles for task ownership. |
| IssuePullRequests | Connects issues to related pull requests, allowing traceability between reported problems and their solutions. |
| IssueSuggestedActors | Lists information about the suggested actors to the repository's issues. |
| IssueTypes | Lists information about repository issue types. |
| MentionableUsers | Identifies users who can be mentioned in repository discussions, including issues, pull requests, and comments, based on permissions. |
| MergeQueueEntries | Tracks individual pull requests in the merge queue, including their statuses and any pending actions for orderly processing. |
| MergeQueues | Provides an overview of active merge queues in a repository, listing pull requests and their order for systematic integration. |
| Milestones | Details milestones in a repository, including their goals, deadlines, and associated issues or pull requests for project tracking. |
| PullRequestComments | Records comments on pull requests, documenting feedback and discussions during the code review process. |
| PullRequestCommits | Provides a list of commits included in pull requests, detailing the changes introduced and the commits' authors. |
| PullRequestFiles | Tracks files modified within pull requests, listing filenames, change types, and details for thorough review. |
| PullRequestReviewComments | Logs comments made during pull request reviews, capturing feedback, suggestions, and discussions for improving the code. |
| PullRequestReviews | Stores details of reviews conducted on pull requests, including reviewer actions (approved, requested changes, commented) and timestamps. |
| PullRequestSuggestedActors | Suggested actors for this pull request. |
| ReleaseAssets | Lists assets attached to repository releases, including binary files, source code archives, and other downloadable content for distribution. |
| PullRequestAssignedActors | Assigned actors to this pull request. |
| Stargazers | Lists users who have starred a repository, indicating their interest in or support for the project. |
| Topics | Catalogs topics assigned to a repository, helping categorize and improve discoverability through tags such as 'open-source' or 'web-development.' |
| TrafficClonesDaily | Logs daily statistics of repository clones for the last 14 days, providing insight into the frequency and patterns of cloning activity. |
| TrafficClonesWeekly | Summarizes weekly clone statistics for the last 14 days, offering a higher-level view of cloning trends. |
| TrafficPageViewsDaily | Records daily page view statistics for a repository, helping track user engagement and traffic patterns over time. |
| TrafficPageViewsWeekly | Aggregates weekly page view statistics for a repository, giving an overview of user interaction trends for the past two weeks. |
| TrafficTopReferralPaths | Lists the top 10 most frequently accessed paths in a repository over the past 14 days, helping identify popular content and entry points. |
| TrafficTopReferralSources | Identifies the top 10 sources driving traffic to a repository in the last 14 days, such as search engines, social media, or external links. |
| Watchers | Tracks users watching a repository, providing visibility into who is monitoring updates, changes, and activity. |
Stored Procedures
Stored Procedures are actions that are invoked via SQL queries. They perform tasks beyond standard CRUD operations, including getting the currently authenticated user or retrieving and refreshing OAuth access tokens.
The following procedures are shipped with the provider:
| Name | Description |
| AddCollaborator | Adds a user to a repository with a specified permission level, updating existing access if necessary. Enterprise Managed Users are added directly, while others receive an invitation. |
| CommitCompare | Compares two references (e.g., commits, branches, or tags) to highlight differences in code or repository history, aiding in change management. |
| CreateCommitOnBranch | Appends a commit to the given branch of the procedure's repository as the authenticated user. |
| DownloadFile | Enables downloading specific files from a repository, facilitating local inspection or offline use. |
| GetCurrentlyAuthenticatedUser | Retrieves details of the currently authenticated user, such as account settings and roles within the repository. |
| GetOAuthAccessToken | Fetches the OAuth Access Token, which is used to authenticate and authorize API calls made to GitHub. |
| GetOAuthAuthorizationURL | Retrieves the OAuth Authorization URL, allowing the client to direct the user's browser to the authorization server and initiate the OAuth process. |
| RefreshOAuthAccessToken | Refreshes an expired OAuth Access Token to maintain continuous authenticated access to GitHub resources without requiring reauthorization from the user. |
| RemoveCollaborator | Removes a collaborator from a repository, revoking their access, unstarring repositories, canceling invitations, unassigning issues, denying pull requests, updating related permissions and may delete forks. |
| UpdatePullRequestBranch | Synchronizes a pull request branch with its base branch by merging or rebasing updates, ensuring consistency with the upstream repository. |
| UploadFile | Allows uploading files to a repository for storage, collaboration, or integration into the project. |