Skip to content

Commit

Permalink
Close #13 - add link in Google Sheets to the GitHub workflow UI
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Nov 15, 2024
1 parent 7f8823b commit a92ecc8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions google/appsscript/check.gs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Lehigh Preserve')
.addItem('Open Contributor Form', 'showForm')
.addItem('Check My Work', 'sendSheetData')
.addItem('Start workbench ingest', 'openExternalLink')
.addToUi();
}

function openExternalLink() {
var html = HtmlService.createHtmlOutput(
'<p><a href="https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flehigh-university-libraries%2Ffabricator%2Factions%2Fworkflows%2Frun.yml" target="_blank">Go to GitHub</a> to start a workbench ingest.</p><p>Make sure to copy the URL of this sheet to start the ingest.</p>'
).setWidth(300).setHeight(120);
SpreadsheetApp.getUi().showModalDialog(html, 'Start workbench ingest');
}

function sendSheetData() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = sheet.getDataRange().getValues();
Expand Down

0 comments on commit a92ecc8

Please sign in to comment.