-
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.
New "import from GitHub" menu in a Google spreadsheet (#209)
The import no longer kicks off a GitHub workflow but rather pulls the data from GitHub directly and refreshes the content of the spreadsheet. Custom data associated with rooms, days, slots, or even breakouts in additional columns is preserved. Formatting is preserved too. The breakouts sheet is created if needed.
- Loading branch information
Showing
12 changed files
with
901 additions
and
460 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
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,25 @@ | ||
import { getProject } from './project.mjs'; | ||
import reportError from './report-error.mjs'; | ||
|
||
/** | ||
* Trigger a GitHub workflow that refreshes the data from GitHub | ||
*/ | ||
export default function () { | ||
const project = getProject(SpreadsheetApp.getActiveSpreadsheet()); | ||
|
||
if (!project.metadata.reponame) { | ||
reportError(`No GitHub repository associated with the current document. | ||
Make sure that the "GitHub repository name" parameter is set in the "Event" sheet. | ||
Also make sure the targeted repository and project have been properly initialized. | ||
If not, ask François or Ian to run the required initialization steps.`); | ||
} | ||
|
||
const repoparts = project.metadata.reponame.split('/'); | ||
const repo = { | ||
owner: repoparts.length > 1 ? repoparts[0] : 'w3c', | ||
name: repoparts.length > 1 ? repoparts[1] : repoparts[0] | ||
}; | ||
|
||
} |
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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
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 _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 exportEventData() { _exportEventData(); } |
Oops, something went wrong.