-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current options would not make a lot of sense for event organizers. The new options split different types of updates in a way that hopefully makes more sense.
- Loading branch information
Showing
10 changed files
with
238 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import reportError from './report-error.mjs'; | ||
|
||
/** | ||
* Trigger a GitHub workflow that refreshes the data from GitHub | ||
*/ | ||
export default async function () { | ||
try { | ||
console.log('Export metadata to GitHub...'); | ||
console.log('- TODO: export metadata to GitHub'); | ||
console.log('Export metadata to GitHub... done'); | ||
|
||
console.log('Report result...'); | ||
console.log('- TODO: report result'); | ||
console.log('Report result... done'); | ||
} | ||
catch(err) { | ||
reportError(err.toString()); | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import reportError from './report-error.mjs'; | ||
import importFromGitHub from './import-from-github.mjs'; | ||
|
||
/** | ||
* Trigger a GitHub workflow that refreshes the data from GitHub | ||
*/ | ||
export default async function () { | ||
try { | ||
const githubProject = await importFromGitHub('grid'); | ||
|
||
console.log('Report result...'); | ||
console.log('- TODO: say what got updated'); | ||
const htmlOutput = HtmlService | ||
.createHtmlOutput(` | ||
<p>Schedule imported from GitHub.</p> | ||
`) | ||
.setWidth(300) | ||
.setHeight(400); | ||
SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Schedule imported'); | ||
console.log('Report result... done'); | ||
} | ||
catch(err) { | ||
reportError(err.toString()); | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import reportError from './report-error.mjs'; | ||
import importFromGitHub from './import-from-github.mjs'; | ||
|
||
/** | ||
* Trigger a GitHub workflow that refreshes the data from GitHub | ||
*/ | ||
export default async function () { | ||
try { | ||
const githubProject = await importFromGitHub('metadata'); | ||
|
||
console.log('Report result...'); | ||
const htmlOutput = HtmlService | ||
.createHtmlOutput(` | ||
<p>Spreadsheet updated with metadata info from GitHub:</p> | ||
<ul> | ||
<li><b>${githubProject.rooms.length}</b> rooms</li> | ||
<li><b>${githubProject.days.length}</b> days</li> | ||
<li><b>${githubProject.slots.length}</b> slots</li> | ||
</ul> | ||
`) | ||
.setWidth(300) | ||
.setHeight(400); | ||
SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Event info updated'); | ||
console.log('Report result... done'); | ||
} | ||
catch(err) { | ||
reportError(err.toString()); | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import reportError from './report-error.mjs'; | ||
import importFromGitHub from './import-from-github.mjs'; | ||
|
||
/** | ||
* Trigger a GitHub workflow that refreshes the data from GitHub | ||
*/ | ||
export default async function () { | ||
try { | ||
const githubProject = await importFromGitHub('sessions'); | ||
|
||
console.log('Report result...'); | ||
const htmlOutput = HtmlService | ||
.createHtmlOutput(` | ||
<p> | ||
<b>${githubProject.sessions.length}</b> | ||
sessions retrieved from GitHub. | ||
</p> | ||
`) | ||
.setWidth(300) | ||
.setHeight(400); | ||
SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Sessions updated'); | ||
console.log('Report result... done'); | ||
} | ||
catch(err) { | ||
reportError(err.toString()); | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
import _createOnOpenTrigger from './create-onopen-trigger.mjs'; | ||
import _addTPACMenu from './add-custom-menu.mjs'; | ||
import _importFromGitHub from './import-from-github.mjs'; | ||
import _exportToGitHub from './export-to-github.mjs'; | ||
import _generateGrid from './generate-grid.mjs'; | ||
import _validateGrid from './validate-grid.mjs'; | ||
import _exportGrid from './export-grid.mjs'; | ||
import _importGrid from './import-grid.mjs'; | ||
import _importSessions from './import-sessions.mjs'; | ||
import _importMetadata from './import-metadata.mjs'; | ||
import _exportMetadata from './export-metadata.mjs'; | ||
import _exportEventData from './export-event-data.mjs'; | ||
|
||
function main() { _createOnOpenTrigger(); } | ||
function addTPACMenu() { _addTPACMenu(); } | ||
function importFromGitHub() { _importFromGitHub(); } | ||
function exportToGitHub() { _exportToGitHub(); } | ||
function generateGrid() { _generateGrid(); } | ||
function validateGrid() { _validateGrid(); } | ||
function exportGrid() { _exportGrid(); } | ||
function importGrid() { _importGrid(); } | ||
function importSessions() { _importSessions(); } | ||
function importMetadata() { _importMetadata(); } | ||
function exportMetadata() { _exportMetadata(); } | ||
function exportEventData() { _exportEventData(); } |
Oops, something went wrong.