Skip to content

Create wiki page "Hfla Google Apps Script Development/Review Process" #4134

@roslynwythe

Description

@roslynwythe

Dependency

Overview

The Google Apps Script development process now includes source control in the Hfla website repository, and the use of the clasp CLI to transfer code between the local workstation and Google Drive, enabling local editing and committing of code. We require a wiki page to guide developers, reviewers, and merge team members how to work with Google Apps Script.

Action Items

  • We are currently in the process of moving the old wiki to the new website-wiki repo, so we will not be making any changes or additions to the old wiki at this time. Thus, we will be adding wiki content through a different process now. Read How to Contribute to the Wiki

For Developers, include:

  • Installation of required npm modules using package.json and package-lock.json
  • Preparation of test environment on dev's personal Google Drive. This is described in step 9 under "How to share files with developers working on an issue" in the WINS Admin Guide
  • Login to Google Drive with clasp login
  • Cloning Google Apps Script using clasp clone <ID> where <ID> is from the developer's copy of the project.
  • Checking that the production Google Apps Script (Code.gs) matches the contents of Code.js in gh-pages.
  • Option to edit code locally or in Google Apps Script UI/IDE, and to push code to Google Drive for testing.
  • When testing is complete, if any code changes were made in the Google Apps Script UI/IDE, use clasp pull to update the local code file.
  • Add/commit Code.js and the manifest file appsscript.json (if any changes were made).
  • Push issue branch to dev's fork of gh-pages, then create PR in the usual manner. In the PR, describe the test setup/strategy, including relevant triggers.

For Pull Request Reviewers (testing in their own Google Drive):

  • Installation of required npm modules using package.json and package-lock.json
  • Preparation of test environment on reviewer's personal Google Drive. This is described in step 9 under "How to share files with developers working on an issue" in the WINS Admin Guide
  • Login to Google Drive with clasp login
  • Cloning Google Apps Script using clasp clone <ID> where <ID> is from the developer's copy of the project.
  • Pull down issue branch, then for testing, run clasp push to copy code to Google Drive.

Merge Instructions:

  • Installation of required npm modules using package.json and package-lock.json
  • Before bringing down the contributor's issue branch, create a local backup copy of each production code file Code.gs that will be updated. Retain the backups until testing is complete.
  • Check that the production code (Code.gs) matches the code (Code.js) in gh-pages.
  • Setup local environment, using clasp clone <ID> where is the production project,
  • Pull down contributor's issue branch
  • Run clasp push to copy code to Google Drive for final testing. Make any change to Triggers that were specified in the PR. If something goes wrong, restore the previous state of the script by copying/pasting from the local backup copy and clicking Save.

After completion, update the following issues with references to the wiki and release any dependencies on this issue, then move issues to New Issue Approval with "ready for dev lead" label:

Resources

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions