Skip to content

Commit fe49340

Browse files
authored
Workflow cleanup (#38)
* Switch update to default on * Remove update option from workflow_dispatch * Add missing dep Signed-off-by: Phil Dibowitz <phil@ipom.com>
1 parent db690b0 commit fe49340

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

.github/workflows/sync.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ on:
44
schedule:
55
- cron: '1,31 * * * *' # twice an hour
66
workflow_dispatch:
7-
inputs:
8-
update:
9-
description: 'Run sync with --update to force all sessions to be updated'
10-
type: boolean
11-
required: false
12-
default: false
137

148
jobs:
159
sync:
@@ -33,11 +27,7 @@ jobs:
3327
GUIDEBOOK_API_TOKEN: ${{ secrets.GUIDEBOOK_API_TOKEN }}
3428
GUIDEBOOK_JWT_TOKEN: ${{ secrets.GUIDEBOOK_JWT_TOKEN }}
3529
run: |
36-
CMD="python ./guidebook/sync_guidebook.py --max-deletes 5 -u"
37-
38-
if [[ "${{ github.event.inputs.update }}" == "true" ]]; then
39-
CMD="$CMD --update"
40-
fi
30+
CMD="python ./guidebook/sync_guidebook.py --max-deletes 5"
4131
4232
echo "Running: $CMD"
4333
$CMD

guidebook/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ click
22
requests
33
pytz
44
xdg-base-dirs
5+
dateutil

guidebook/sync_guidebook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,8 @@ def get_tokens(logger):
764764
@click.option(
765765
"--update/--no-update",
766766
"-u",
767-
default=False,
768-
help="Update existing sessions.",
767+
default=True,
768+
help="Update existing sessions. Does so idempotently, defaults to True.",
769769
)
770770
@click.option(
771771
"--delete-all/--no-delete-all",

0 commit comments

Comments
 (0)