-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
VERSION 0.6 | ||
|
||
FROM alpine/git:2.36.3 | ||
|
||
# Estimates monthly active users of a GIT remote repo, based on past commits | ||
active-users: | ||
RUN --secret repoUrl git clone --bare --filter=blob:none $repoUrl repo; | ||
RUN cd repo; \ | ||
git --no-pager log -s --format="%ae" --since=30.days | grep -v @users.noreply.github.com | sort | uniq -c | awk '$1 >= 3 {print $0}' | wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Billing utilities | ||
## +active-users | ||
Estimates monthly active users of a GIT remote repo, based on past commits | ||
|
||
Usage: | ||
``` | ||
earthly --secret repoUrl=<repoUrl> github.com/earthly/lib/billing+active-users | ||
``` | ||
|
||
### Private repositories | ||
For private repositories use `https` URLs, and pass credentials within the URL: | ||
``` | ||
earthly --secret repoUrl=https://<user>@<password>/host/repo.git github.com/earthly/lib/billing+active-users | ||
``` | ||
> Note: | ||
> For GitHub private repos you need to use a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) instead of your password |