Rename calendar.json to prevent unwanted edits
diff --git a/.github/workflows/getcalendar.yml b/.github/workflows/getcalendar.yml
index fbe523c..20f2e5b 100644
--- a/.github/workflows/getcalendar.yml
+++ b/.github/workflows/getcalendar.yml
@@ -25,7 +25,7 @@
git status
echo "preparing to push change(s)"
git add .
- if git commit -m "Add calendar updates" -m "Calendar updates are fetched by the getcalendar.yml workflow"
+ if git commit -m "Update calendar data (getcalendar.yml workflow)"
then
git push
echo "Changed!"
diff --git a/getcalendar.sh b/getcalendar.sh
index 5ae92a0..e61a8b5 100644
--- a/getcalendar.sh
+++ b/getcalendar.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Fetch calendar data; will be stored as calendar.json
+# Fetch calendar data; will be stored as calendar-DO-NOT-EDIT.json
CALENDAR_ID="nerseigospses068jd57bk5ar8@group.calendar.google.com"
API_KEY="AIzaSyDJkXq1faq2G5NkFkFTh9Sikdpc2YXTVXs"
@@ -9,7 +9,7 @@
echo "Fetching calendar data"
-curl -sS -o calendar.json "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID}/events${OPTS}" \
+curl -sS -o calendar-DO-NOT-EDIT.json "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID}/events${OPTS}" \
-H 'accept: application/json, text/javascript, */*; q=0.01' \
-H 'origin: https://events.apache.org'
diff --git a/static/js/calendar.json b/static/js/calendar-DO-NOT-EDIT.json
similarity index 100%
rename from static/js/calendar.json
rename to static/js/calendar-DO-NOT-EDIT.json
diff --git a/static/js/events-calendar.js b/static/js/events-calendar.js
index f5e2543..1036993 100644
--- a/static/js/events-calendar.js
+++ b/static/js/events-calendar.js
@@ -9,7 +9,7 @@
// Fetch
$.ajax({
type: 'GET',
- url: encodeURI('/js/calendar.json'),
+ url: encodeURI('/js/calendar-DO-NOT-EDIT.json'),
dataType: 'json',
success: function (response) {
events.empty();