Skip to content

Commit

Permalink
feat(#204): experiment with QUERY
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Nov 14, 2024
1 parent 5210afe commit ab2d6bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- name: Create
run: |
docker run --rm -v "$(pwd)/output:/collection" \
-e QUERY="stars:>10 size:>=20 mirror:false template:false NOT android" \
-e START="${{ inputs.start }}" -e END="${{ inputs.end }}" \
-e COLLECT_TOKEN="${{ secrets.COLLECT_TOKEN_1 }}" \
-e GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y \

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

Expand Down
2 changes: 1 addition & 1 deletion data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ echo "$COLLECT_TOKEN" >> "$PATS"
{
"$RUN"/just install
poetry install
"$RUN"/just collect "collection/$OUT" "$START" "$END" "repos"
"$RUN"/just collect "collection/$OUT" "$QUERY" "$START" "$END" "repos"
"$RUN"/just pulls "../repos.csv" "$GH_TOKEN" "../repos-with-pulls.csv"
"$RUN"/just filter "../repos-with-pulls.csv" "../after-filter.csv"
"$RUN"/just extract "../after-filter.csv" "../after-extract.csv"
Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ clean:
rm sr-data/experiment/* && rmdir sr-data/experiment

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

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

0 comments on commit ab2d6bc

Please sign in to comment.