Skip to main content

clone_traffic

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

Overview

Nameclone_traffic
TypeResource
Idgithub.repos.clone_traffic

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
clonesarray
countinteger
uniquesinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_clonesselectowner, repoperGet the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.

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.
perstringThe time frame to display results for.

SELECT examples

Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.

SELECT
clones,
count,
uniques
FROM github.repos.clone_traffic
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND per = '{{ per }}'
;