# Functions
GetAllCommits lists every commit in a project.
GetAllContributors lists all of the git contributors in a a repository.
GetAllLabels gets all labels from a GitHub repository.
GetAllMilestones lists milestones in a repository.
GetAllOrganizations lists the available organizations for the client.
GetAllPackages lists packages in a repository.
GetAllPullRequests uses the graphql search endpoint API to search all pull requests in the repository.
GetAllReleases retrieves every release from a repository.
GetAllRepositories retrieves all available repositories for an organization.
GetAllTags retrieves every tag from a repository.
GetAllVulnerabilities gets all vulnerabilities from a GitHub repository.
GetCommitsInRange lists all commits in a repository within a time range.
GetIssuesInRange lists issues in a project given a time range.
GetPullRequestsInRange uses the graphql search endpoint API to find pull requests in the given time range.
GetQueryHandlers creates the QueryTypeMux type for handling queries.
GetReleasesInRange retrieves every release from the repository and then returns the ones that fall within the given time range.
GetStargazers gets all stargazers for a GitHub repository.
GetTagsInRange retrieves every tag from the repository and then returns the ones that fall within the given time range.
GetWorkflows gets all workflows for a GitHub repository.
GetWorkflowUsage return the usage for a specific workflow.
InterPolateMacros interpolate macros on a given query string.
NewDatasource creates a new datasource for handling queries.
UnmarshalQuery attempts to unmarshal a query from JSON.
# Constants
PageNumberLimit is the limit on the number of pages that will be traversed.
# Structs
Commit represents a git commit from GitHub's API.
CVSS is a way of grading the severity of a vulnerability.
Datasource handles requests to GitHub.
A GitActor is a user that has performed a git action, like a commit.
Issue represents a GitHub issue in a repository.
Label is a GitHub label used in Issues / Pull Requests.
An Organization is a single GitHub organization.
Package represents a GitHub Package.
PackageStatistics is a common object used in package versions and packages themselves.
PackageVersion is the version of a package.
PullRequest is a GitHub pull request.
PullRequestAuthor is the structure of the Author object in a Pull Request (which requires a graphQL object expansion on `User`).
QueryHandler is the main handler for datasource queries.
QueryListCommits is the object representation of the graphql query for retrieving a paginated list of commits for a project query { repository(name:"$name", owner:"$owner") { object(expression: "master") { ..
QueryListCommitsInRange is the graphql query for retrieving a paginated list of commits within a time range.
QueryListContributors is the GraphQL query for listing contributors (or rather, mentionable users in a repository).
QueryListLabels lists all labels in a repository { repository(name: "grafana", owner: "grafana") { labels(first: 100) { nodes { color description name } } } }.
QueryListMilestones lists all milestones in a repository { repository(name: "grafana", owner: "grafana") { milestones(first: 100) { nodes { color description name } } } }.
QueryListOrganizations is the GraphQL query for listing organizations.
QueryListPackages is the GraphQL query for listing GitHub packages
{ repository(name: "grafana", owner: "grafana") { packages(names: "", packageType: "", first: 10) { nodes { id name packageType statistics { downloadsTotalCount } versions(first: 10) { nodes { preRelease platform version statistics { downloadsTotalCount } } pageInfo { hasNextPage endCursor } } } totalCount pageInfo { endCursor hasNextPage } } } }.
QueryListPullRequests lists all pull requests in a repository
{ search(query: "is:pr repo:grafana/grafana merged:2020-08-19..*", type: ISSUE, first: 100) { nodes { ..
QueryListReleases is the GraphQL query for listing GitHub releases in a repository.
QueryListRepositories is the GraphQL query for retrieving a list of repositories for an organization { search(query: "is:pr repo:grafana/grafana merged:2020-08-19..*", type: ISSUE, first: 100) { nodes { ..
QueryListTags is the GraphQL query for listing GitHub tags in a repository
{ repository(name: "grafana", owner: "grafana") { refs( refPrefix: "refs/tags/" orderBy: {field: TAG_COMMIT_DATE, direction: DESC} first: 30 query: "" ) { nodes { name target { __typename ..
QueryListVulnerabilities lists all vulnerability alerts in a repository
{ repository(name: "repo-name", owner: "repo-owner") { vulnerabilityAlerts(first: 100) { nodes { createdAt dismissedAt securityVulnerability { package { name } advisory { description } } } } } }.
QuerySearchIssues is the object representation of the graphql query for retrieving a paginated list of issues using the search query
{ search(query: "is:issue repo:grafana/grafana opened:2020-08-19..*", type: ISSUE, first: 100) { nodes { ..
QueryStargazers is the object representation of the graphql query for retrieving a paginated list of stargazers for a repository
query { repository(owner: $owner, name: $name) { stargazers(first: 100, orderBy: {field: STARRED_AT, direction: DESC}, after: $cursor) { totalCount pageInfo { hasNextPage startCursor endCursor } edges { starredAt node { id login name company email url } } } } }.
Release is a GitHub release.
Repository is a code repository.
SecurityAdvisory is the main security report for a vulnerability in a repository.
SecurityAdvisoryPackage is an object to share the name of the package that is impacted.
SecurityAdvisoryPackageVersion is a struct with an identifier to identify the package.
Stargazer a GitHub user tied to when they starred the repository.
StargazerWrapper is a mapping of a GitHub stargazer to what the total count of stars roughly would've been when they starred the repository.
Vulnerability is used to collect Vulnerability information about GitHub.
# Type aliases
Commits is a slice of git commits.
GitActors is a list of GitHub users.
Issues is a slice of GitHub issues.
Labels is a list of GitHub labels.
Milestones is a list of GitHub milestones.
Organizations is a slice of GitHub Organizations.
Packages is a list of GitHub packages.
PullRequests is a list of GitHub Pull Requests.
QueryHandlerFunc is the function signature used for mux.HandleFunc.
Releases is a slice of GitHub releases.
Repositories is a list of GitHub repositories.
StargazersWrapper is a list of GitHub wrapped stargazers.
Tags is a list of GitHub tags.
Users is a slice of GitHub users.
Vulnerabilities is a list of GitHub vulnerabilities.
WorkflowsWrapper is a list of GitHub workflows.
WorkflowUsageWrapper is wraps the workflow usage.