Skip to content

Commit

Permalink
Merge pull request #22 from ebmdatalab/qol-fixes
Browse files Browse the repository at this point in the history
Some QoL fixes
  • Loading branch information
ghickman authored Nov 17, 2023
2 parents 72eeeb7 + a352a04 commit b9c946c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 10 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ clean:
rm -rf .venv


_env:
#!/usr/bin/env bash
set -euo pipefail
test -f .env || cp dotenv-sample .env


# ensure valid virtualenv
virtualenv:
virtualenv: _env
#!/usr/bin/env bash
set -euo pipefail
Expand Down Expand Up @@ -134,15 +141,12 @@ metrics *args: devenv
$BIN/python -m metrics {{ args }}


docker-build env="dev":
docker-build env="dev": _env
#!/usr/bin/env bash
set -euo pipefail
test -z "${SKIP_BUILD:-}" || { echo "SKIP_BUILD set"; exit 0; }

# ensure env file exists
test -f .env || cp dotenv-sample .env

# set build args for prod builds
export BUILD_DATE=$(date -u +'%y-%m-%dT%H:%M:%SZ')
export GITREF=$(git rev-parse --short HEAD)
Expand All @@ -152,6 +156,6 @@ docker-build env="dev":


# run command in dev|prod container
docker-run env="dev" *args="bash":
docker-run env="dev" *args="bash": _env
{{ just_executable() }} docker-build {{ env }}
docker compose run --rm metrics-{{ env }} {{ args }}
1 change: 1 addition & 0 deletions metrics/github/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def _iter_pull_requests(org, date_range):
# we can't seem to interpolate graphql variables into a string, so doing it
# here
search_query = f"is:pr draft:false org:{org} {date_range}"
log.debug(f"GitHub search query: {search_query}")

query = """
query getPRs($cursor: String, $searchQuery: String!){
Expand Down

0 comments on commit b9c946c

Please sign in to comment.