Conversation
Bind all GAS projects to a standard GCP project for Cloud Logging, Error Reporting, and API usage monitoring. Enable clasp run for CI/CD Script Properties injection. - Add --gcp-project option to init.sh (clasp create --parentId) - Add setScriptProperties GAS function + set-properties.sh wrapper - Add auto-injection step in CD workflows (GitHub Actions + GitLab CI) - Add post-deploy hook examples for both platforms - Update README, setup docs, and template sync config
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--gcp-project <NUMBER>option toscripts/init.sh— binds GAS projects to a standard GCP project viaclasp create --parentId, includesprojectIdinCLASP_JSON, and setsGCP_PROJECT_NUMBERas a CI/CD variablesrc/setProperties.ts+scripts/set-properties.shfor Script Properties injection viaclasp runGCP_PROJECT_NUMBERandSCRIPT_PROPERTIESare set.github/hooks/post-deploy.sh.example,.gitlab/post-deploy.yml.example).templatesyncignoreMotivation
clasp runso CI/CD can automatically inject Script Properties (API keys, webhooks, etc.)Test plan
pnpm run checkpasses (lint + typecheck + test)init.sh --gcp-project 123456789creates GAS projects with--parentIdCLASP_JSONincludesprojectIdfield when GCP project is specifiedset-properties.sh --json '{"KEY":"value"}'callsclasp run setScriptPropertiesGCP_PROJECT_NUMBERorSCRIPT_PROPERTIESis not setinit.shwithout--gcp-projectworks as before