Skip to content

Commit ab2d6bc

Browse files
committed
feat(#204): experiment with QUERY
1 parent 5210afe commit ab2d6bc

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/datasets.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- name: Create
6161
run: |
6262
docker run --rm -v "$(pwd)/output:/collection" \
63+
-e QUERY="stars:>10 size:>=20 mirror:false template:false NOT android" \
6364
-e START="${{ inputs.start }}" -e END="${{ inputs.end }}" \
6465
-e COLLECT_TOKEN="${{ secrets.COLLECT_TOKEN_1 }}" \
6566
-e GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y \
5555

5656
# Run variables.
5757
ENV RUN="/root/.cargo/bin" \
58+
QUERY="stars:>10 language:java size:>=20 mirror:false template:false NOT android" \
5859
PATS="pats.txt" \
5960
OUT="data"
6061

data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ echo "$COLLECT_TOKEN" >> "$PATS"
2424
{
2525
"$RUN"/just install
2626
poetry install
27-
"$RUN"/just collect "collection/$OUT" "$START" "$END" "repos"
27+
"$RUN"/just collect "collection/$OUT" "$QUERY" "$START" "$END" "repos"
2828
"$RUN"/just pulls "../repos.csv" "$GH_TOKEN" "../repos-with-pulls.csv"
2929
"$RUN"/just filter "../repos-with-pulls.csv" "../after-filter.csv"
3030
"$RUN"/just extract "../after-filter.csv" "../after-extract.csv"

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ clean:
6262
rm sr-data/experiment/* && rmdir sr-data/experiment
6363

6464
# Collect repositories.
65-
collect dir start end out:
65+
collect dir query start end out:
6666
mkdir -p {{dir}}
67-
ghminer --query "stars:>10 language:java size:>=20 mirror:false template:false NOT android" \
68-
--start "{{start}}" --end "{{end}}" --tokens "$PATS" --filename "{{out}}"
67+
ghminer --query "{{query}}" --start "{{start}}" --end "{{end}}" \
68+
--tokens "$PATS" --filename "{{out}}"
6969

7070
# Fetch pulls count for collected repos.
7171
pulls repos token out="experiment/with-pulls.csv":

0 commit comments

Comments
 (0)