stats_code_frequency
Creates, updates, deletes, gets or lists a stats_code_frequency resource.
Overview
| Name | stats_code_frequency |
| Type | Resource |
| Id | github.repos.stats_code_frequency |
Fields
The following fields are returned by SELECT queries:
- get_code_frequency_stats
Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_code_frequency_stats | select | owner, repo | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_code_frequency_stats
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
;