forked from OpenBB-finance/OpenBB
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.31 KB
/
mergestat-data-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: MergeStat Data Sync
on:
schedule:
- cron: '0 0 * * *' # at midnight (utc) every day
jobs:
build:
name: Run MergeStat
runs-on: ubuntu-latest
steps:
- name: Checkout MergeStat repo
uses: actions/checkout@v2
with:
repository: mergestat/mergestat
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- name: Install libgit2
run: make libgit2
- name: Build MergeStat
run: |
make
cp .build/mergestat /usr/local/bin/mergestat
- name: Sync tables
run: |
export PGSYNC=1
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export GITHUB_PER_PAGE=15
export POSTGRES_CONNECTION=${{ secrets.POSTGRES_CONNECTION }}
mergestat pgsync -v pull_requests "SELECT * FROM github_repo_prs('OpenBB-finance/OpenBBTerminal')"
mergestat pgsync -v issues "SELECT * FROM github_repo_issues('OpenBB-finance/OpenBBTerminal')"
mergestat pgsync -v repos "SELECT * FROM github_org_repos('OpenBBTerminal')"
mergestat pgsync -v commit_stats "SELECT * FROM commits('https://github.com/OpenBB-finance/OpenBBTerminal'), stats('https://github.com/OpenBB-finance/OpenBBTerminal', commits.hash)"
mergestat pgsync -v stargazers "SELECT * FROM github_stargazers('OpenBB-finance/OpenBBTerminal')"