GitHubRepository

A repository contains the content for a project.

EXAMPLE USAGES
GitHubOpenPullRequestsQuery

Fetch the first ten open pull requests for a GitHub repository, sorted by when they were opened.

GitHubGetPullRequest

Get the details of a pull request by its number.

Also see:

GitHubDeleteIssueById

You'll need to find the GitHub issue id first (see the GitHubFindIssueIdByNumber example) to use as the argument to issueId.

Since issue ids are globally unique across every kind of object in GitHub, you won't need to add the repository owner/name, just the id!

{
  "id": "MDU6SXNzdWU1NDUyNDk2ODg="
}
GitHubGetFileShaAndContent

Get the (textual) value of a file in a GitHub repo via GraphQL

  • $branchAndFilePath should be formatted as ${branchName}:${filePath without the leading '/'}

Note that the text field will be null if the file is a binary blog (such as an image).

If you need to read the binary content, email [support@onegraph.com](mailto:support@onegraph.com?subject=Can you add a base64-encoded binary content field to the GitHubBlob type on OneGraph?) and we can stitch in the corresponding REST endpoint

FIELDS
assignableUsers (GitHubUserConnection!)

A list of users that can be assigned to issues in this repository.

branchProtectionRules (GitHubBranchProtectionRuleConnection!)

A list of branch protection rules for this repository.

codeOfConduct (GitHubCodeOfConduct)

Returns the code of conduct for this repository

collaborators (GitHubRepositoryCollaboratorConnection)

A list of collaborators associated with the repository.

commitComments (GitHubCommitCommentConnection!)

A list of commit comments associated with the repository.

contactLinks ([GitHubRepositoryContactLink!])

Returns a list of contact links associated to the repository

createdAt (GitHubDateTime!)

Identifies the date and time when the object was created.

databaseId (Int)

Identifies the primary key from the database.

defaultBranchRef (GitHubRef)

The Ref associated with the repository's default branch.

deleteBranchOnMerge (Boolean!)

Whether or not branches are automatically deleted when merged in this repository.

deployKeys (GitHubDeployKeyConnection!)

A list of deploy keys that are on this repository.

deployments (GitHubDeploymentConnection!)

Deployments associated with the repository

description (String)

The description of the repository.

descriptionHTML (GitHubHTML!)

The description of the repository rendered to HTML.

discussion (GitHubDiscussion)

Returns a single discussion from the current repository by number.

discussionCategories (GitHubDiscussionCategoryConnection!)

A list of discussion categories that are available in the repository.

discussions (GitHubDiscussionConnection!)

A list of discussions that have been opened in the repository.

diskUsage (Int)

The number of kilobytes this repository occupies on disk.

forkCount (Int!)

Returns how many forks there are of this repository in the whole network.

forks (GitHubRepositoryConnection!)

A list of direct forked repositories.

fundingLinks ([GitHubFundingLink!]!)

The funding links for this repository

hasIssuesEnabled (Boolean!)

Indicates if the repository has issues feature enabled.

hasProjectsEnabled (Boolean!)

Indicates if the repository has the Projects feature enabled.

hasWikiEnabled (Boolean!)

Indicates if the repository has wiki feature enabled.

homepageUrl (GitHubURI)

The repository's URL.

id (ID!)

No description

interactionAbility (GitHubRepositoryInteractionAbility)

The interaction ability settings for this repository.

isArchived (Boolean!)

Indicates if the repository is unmaintained.

isBlankIssuesEnabled (Boolean!)

Returns true if blank issue creation is allowed

isDisabled (Boolean!)

Returns whether or not this repository disabled.

isEmpty (Boolean!)

Returns whether or not this repository is empty.

isFork (Boolean!)

Identifies if the repository is a fork.

isInOrganization (Boolean!)

Indicates if a repository is either owned by an organization, or is a private fork of an organization repository.

isLocked (Boolean!)

Indicates if the repository has been locked or not.

isMirror (Boolean!)

Identifies if the repository is a mirror.

isPrivate (Boolean!)

Identifies if the repository is private or internal.

isSecurityPolicyEnabled (Boolean)

Returns true if this repository has a security policy

issue (GitHubIssue)

Returns a single issue from the current repository by number.

issueOrPullRequest (GitHubIssueOrPullRequest)

Returns a single issue-like object from the current repository by number.

issues (GitHubIssueConnection!)

A list of issues that have been opened in the repository.

issueTemplates ([GitHubIssueTemplate!])

Returns a list of issue templates associated to the repository

isTemplate (Boolean!)

Identifies if the repository is a template that can be used to generate new repositories.

isUserConfigurationRepository (Boolean!)

Is this repository a user configuration repository?

label (GitHubLabel)

Returns a single label by name

labels (GitHubLabelConnection)

A list of labels associated with the repository.

languages (GitHubLanguageConnection)

A list containing a breakdown of the language composition of the repository.

latestRelease (GitHubRelease)

Get the latest release for the repository if one exists.

licenseInfo (GitHubLicense)

The license associated with the repository

lockReason (GitHubRepositoryLockReason)

The reason the repository has been locked.

mentionableUsers (GitHubUserConnection!)

A list of Users that can be mentioned in the context of the repository.

mergeCommitAllowed (Boolean!)

Whether or not PRs are merged with a merge commit on this repository.

milestone (GitHubMilestone)

Returns a single milestone from the current repository by number.

milestones (GitHubMilestoneConnection)

A list of milestones associated with the repository.

mirrorUrl (GitHubURI)

The repository's original mirror URL.

name (String!)

The name of the repository.

nameWithOwner (String!)

The repository's name with owner.

object (GitHubGitObject)

A Git object in the repository

oneGraphId (ID!)

Unique id across all of OneGraph

oneGraphLinkedNodes (OneGraphLinkedNodesConnection!)

List of OneGraphNodes that are linked from this node.

openGraphImageUrl (GitHubURI!)

The image used to represent this repository in Open Graph data.

owner (GitHubRepositoryOwner!)

The User owner of the repository.

packages (GitHubPackageConnection!)

A list of packages under the owner.

parent (GitHubRepository)

The repository parent, if this is a fork.

pinnedDiscussions (GitHubPinnedDiscussionConnection!)

A list of discussions that have been pinned in this repository.

pinnedIssues (GitHubPinnedIssueConnection)

A list of pinned issues for this repository.

primaryLanguage (GitHubLanguage)

The primary language of the repository's code.

project (GitHubProject)

Find project by number.

projects (GitHubProjectConnection!)

A list of projects under the owner.

projectsResourcePath (GitHubURI!)

The HTTP path listing the repository's projects

projectsUrl (GitHubURI!)

The HTTP URL listing the repository's projects

pullRequest (GitHubPullRequest)

Returns a single pull request from the current repository by number.

pullRequests (GitHubPullRequestConnection!)

A list of pull requests that have been opened in the repository.

pushedAt (GitHubDateTime)

Identifies when the repository was last pushed to.

rebaseMergeAllowed (Boolean!)

Whether or not rebase-merging is enabled on this repository.

ref (GitHubRef)

Fetch a given ref from the repository

refs (GitHubRefConnection)

Fetch a list of refs from the repository

release (GitHubRelease)

Lookup a single release given various criteria.

releases (GitHubReleaseConnection!)

List of releases which are dependent on this repository.

repositoryTopics (GitHubRepositoryTopicConnection!)

A list of applied repository-topic associations for this repository.

resourcePath (GitHubURI!)

The HTTP path for this repository

securityPolicyUrl (GitHubURI)

The security policy URL.

shortDescriptionHTML (GitHubHTML!)

A description of the repository, rendered to HTML without any links in it.

squashMergeAllowed (Boolean!)

Whether or not squash-merging is enabled on this repository.

sshUrl (GitHubGitSSHRemote!)

The SSH URL to clone this repository

stargazerCount (Int!)

Returns a count of how many stargazers there are on this object

stargazers (GitHubStargazerConnection!)

A list of users who have starred this starrable.

submodules (GitHubSubmoduleConnection!)

Returns a list of all submodules in this repository parsed from the .gitmodules file as of the default branch's HEAD commit.

tempCloneToken (String)

Temporary authentication token for cloning this repository.

templateRepository (GitHubRepository)

The repository from which this repository was generated, if any.

updatedAt (GitHubDateTime!)

Identifies the date and time when the object was last updated.

url (GitHubURI!)

The HTTP URL for this repository

usesCustomOpenGraphImage (Boolean!)

Whether this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar.

viewerCanAdminister (Boolean!)

Indicates whether the viewer has admin permissions on this repository.

viewerCanCreateProjects (Boolean!)

Can the current viewer create new projects on this owner.

viewerCanSubscribe (Boolean!)

Check if the viewer is able to change their subscription status for the repository.

viewerCanUpdateTopics (Boolean!)

Indicates whether the viewer can update the topics of this repository.

viewerDefaultCommitEmail (String)

The last commit email for the viewer.

viewerDefaultMergeMethod (GitHubPullRequestMergeMethod!)

The last used merge method by the viewer or the default for the repository.

viewerHasStarred (Boolean!)

Returns a boolean indicating whether the viewing user has starred this starrable.

viewerPermission (GitHubRepositoryPermission)

The users permission level on the repository. Will return null if authenticated as an GitHub App.

viewerPossibleCommitEmails ([String!])

A list of emails this viewer can commit with.

viewerSubscription (GitHubSubscriptionState)

Identifies if the viewer is watching, not watching, or ignoring the subscribable entity.

vulnerabilityAlerts (GitHubRepositoryVulnerabilityAlertConnection)

A list of vulnerability alerts that are on this repository.

watchers (GitHubUserConnection!)

A list of users watching the repository.

DEPRECATED FIELDS
IMPLEMENTS
OneGraphNode

An object with a globally unique id across all of OneGraph

GitHubNode

An object with an ID.

GitHubPackageOwner

Represents an owner of a package.

GitHubProjectOwner

Represents an owner of a Project.

GitHubRepositoryInfo

A subset of repository info.

GitHubStarrable

Things that can be starred.

GitHubSubscribable

Entities that can be subscribed to for web and email notifications.

GitHubUniformResourceLocatable

Represents a type that can be retrieved by a URL.

REQUIRED BY
GitHubArchiveRepositoryPayload

Autogenerated return type of ArchiveRepository

GitHubBlob

Represents a Git blob.

GitHubBranchProtectionRule

A branch protection rule.

GitHubCheckRun

A check run.

GitHubCheckSuite

A check suite.

GitHubCloneTemplateRepositoryPayload

Autogenerated return type of CloneTemplateRepository

GitHubCommit

Represents a Git commit.

GitHubCommitComment

Represents a comment on a given Commit.

GitHubCommitCommentThread

A thread of comments on a commit.

GitHubCommitContributionsByRepository

This aggregates commits made by a user within one repository.

GitHubCreatedCommitContribution

Represents the contribution a user made by committing to a repository.

GitHubCreatedPullRequestReviewContribution

Represents the contribution a user made by leaving a review on a pull request.

GitHubCreatedRepositoryContribution

Represents the contribution a user made on GitHub by creating a repository.

GitHubCreateRepositoryPayload

Autogenerated return type of CreateRepository

GitHubDeleteIssuePayload

Autogenerated return type of DeleteIssue

GitHubDeployment

Represents triggered deployment instance.

GitHubDiscussion

A discussion in a repository.

GitHubDiscussionCategory

A category for discussions in a repository.

GitHubGitObject

Represents a Git object.

GitHubIssue

An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project.

GitHubIssueComment

Represents a comment on an Issue.

GitHubIssueContributionsByRepository

This aggregates issues opened by a user within one repository.

GitHubLabel

A label for categorizing Issues or Milestones with a given Repository.

GitHubLinkRepositoryToProjectPayload

Autogenerated return type of LinkRepositoryToProject

GitHubMilestone

Represents a Milestone object on a given repository.

GitHubOrganization

An account on GitHub, with one or more owners, that has repositories, members and teams.

GitHubOrgRestoreMemberMembershipRepositoryAuditEntryData

Metadata for a repository membership for org.restore_member actions

GitHubPackage

Information for an uploaded package.

GitHubPinnedDiscussion

A Pinned Discussion is a discussion pinned to a repository's index page.

GitHubPinnedIssue

A Pinned Issue is a issue pinned to a repository's index page.

GitHubPrivateRepositoryForkingDisableAuditEntry

Audit log entry for a private_repository_forking.disable event.

GitHubPrivateRepositoryForkingEnableAuditEntry

Audit log entry for a private_repository_forking.enable event.

GitHubPullRequest

A repository pull request.

GitHubPullRequestCommitCommentThread

Represents a commit comment thread part of a pull request.

GitHubPullRequestContributionsByRepository

This aggregates pull requests opened by a user within one repository.

GitHubPullRequestReview

A review object for a given pull request.

GitHubPullRequestReviewComment

A review comment associated with a given repository pull request.

GitHubPullRequestReviewContributionsByRepository

This aggregates pull request reviews made by a user within one repository.

GitHubPullRequestReviewThread

A threaded list of comments for a given pull request.

GitHubPush

A Git push.

GitHubQuery

The query root of GitHub's GraphQL interface.

GitHubRef

Represents a Git reference.

GitHubReferencedEvent

Represents a 'referenced' event on a given ReferencedSubject.

GitHubRelease

A release contains the content for a release.

GitHubRepoAccessAuditEntry

Audit log entry for a repo.access event.

GitHubRepoAddMemberAuditEntry

Audit log entry for a repo.add_member event.

GitHubRepoAddTopicAuditEntry

Audit log entry for a repo.add_topic event.

GitHubRepoArchivedAuditEntry

Audit log entry for a repo.archived event.

GitHubRepoChangeMergeSettingAuditEntry

Audit log entry for a repo.change_merge_setting event.

GitHubRepoConfigDisableAnonymousGitAccessAuditEntry

Audit log entry for a repo.config.disable_anonymous_git_access event.

GitHubRepoConfigDisableCollaboratorsOnlyAuditEntry

Audit log entry for a repo.config.disable_collaborators_only event.

GitHubRepoConfigDisableContributorsOnlyAuditEntry

Audit log entry for a repo.config.disable_contributors_only event.

GitHubRepoConfigDisableSockpuppetDisallowedAuditEntry

Audit log entry for a repo.config.disable_sockpuppet_disallowed event.

GitHubRepoConfigEnableAnonymousGitAccessAuditEntry

Audit log entry for a repo.config.enable_anonymous_git_access event.

GitHubRepoConfigEnableCollaboratorsOnlyAuditEntry

Audit log entry for a repo.config.enable_collaborators_only event.

GitHubRepoConfigEnableContributorsOnlyAuditEntry

Audit log entry for a repo.config.enable_contributors_only event.

GitHubRepoConfigEnableSockpuppetDisallowedAuditEntry

Audit log entry for a repo.config.enable_sockpuppet_disallowed event.

GitHubRepoConfigLockAnonymousGitAccessAuditEntry

Audit log entry for a repo.config.lock_anonymous_git_access event.

GitHubRepoConfigUnlockAnonymousGitAccessAuditEntry

Audit log entry for a repo.config.unlock_anonymous_git_access event.

GitHubRepoCreateAuditEntry

Audit log entry for a repo.create event.

GitHubRepoDestroyAuditEntry

Audit log entry for a repo.destroy event.

GitHubRepoRemoveMemberAuditEntry

Audit log entry for a repo.remove_member event.

GitHubRepoRemoveTopicAuditEntry

Audit log entry for a repo.remove_topic event.

GitHubRepository

A repository contains the content for a project.

GitHubRepositoryAuditEntryData

Metadata for an audit entry with action repo.*

GitHubRepositoryConnection

A list of repositories owned by the subject.

GitHubRepositoryEdge

An edge in a connection.

GitHubRepositoryNode

Represents a object that belongs to a repository.

GitHubRepositoryOwner

Represents an owner of a Repository.

GitHubRepositoryVulnerabilityAlert

A alert for a repository with an affected vulnerability.

GitHubSetRepositoryInteractionLimitPayload

Autogenerated return type of SetRepositoryInteractionLimit

GitHubStarredRepositoryConnection

The connection type for Repository.

GitHubStarredRepositoryEdge

Represents a starred repository.

GitHubTag

Represents a Git tag.

GitHubTeamAddRepositoryAuditEntry

Audit log entry for a team.add_repository event.

GitHubTeamRemoveRepositoryAuditEntry

Audit log entry for a team.remove_repository event.

GitHubTeamRepositoryConnection

The connection type for Repository.

GitHubTeamRepositoryEdge

Represents a team repository.

GitHubTransferredEvent

Represents a 'transferred' event on a given issue or pull request.

GitHubTree

Represents a Git tree.

GitHubTreeEntry

Represents a Git tree entry.

GitHubUnarchiveRepositoryPayload

Autogenerated return type of UnarchiveRepository

GitHubUnlinkRepositoryFromProjectPayload

Autogenerated return type of UnlinkRepositoryFromProject

GitHubUpdateCheckSuitePreferencesPayload

Autogenerated return type of UpdateCheckSuitePreferences

GitHubUpdateRepositoryPayload

Autogenerated return type of UpdateRepository

GitHubUpdateTopicsPayload

Autogenerated return type of UpdateTopics

GitHubUser

A user is an individual's account on GitHub that owns repositories and can make new content.

____________________________________________________________________________________________________