Skip to main content

stats_code_frequency

Creates, updates, deletes, gets or lists a stats_code_frequency resource.

Overview

Namestats_code_frequency
TypeResource
Idgithub.repos.stats_code_frequency

Fields

The following fields are returned by SELECT queries:

Returns a weekly aggregate of the number of additions and deletions pushed to a repository.

NameDatatypeDescription

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_code_frequency_statsselectowner, repoReturns a weekly aggregate of the number of additions and deletions pushed to a repository.

> [!NOTE]
> This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

Returns a weekly aggregate of the number of additions and deletions pushed to a repository.

> [!NOTE]
> This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned.

SELECT
*
FROM github.repos.stats_code_frequency
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;