googleworkspace / googleworkspace/apps-script-samples
.clasp.json will be overwrited for people using clasp to upload GAS to their own projects
@jpoehnelt is already working on this.
Since Dec 3, 2023.
- Dominant language
- JavaScript
- Stars
- 5.2k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
Summary
The .clasp.json files contain the GAS project IDs only accessible inside Google. (example)
However, people using clasp CLI to push to their GAS project ID will need to overwrite these files.
What I think it might be better in either way:
add .clasp.json in .gitignore file but it will not work since this file is required for your Github Actions Workflow.- rename the Google-only accessible
.clasp.jsonto other filename instead of default.clasp.json, while rename them back to.clasp.jsonbefore executingclasp push -f(link) inside your Github Action Workflow
Expected Behavior
People not work at Google can clone/commit this repo without overwriting this .clasp.json file.
Actual Behavior
Everyone outside Google needs to overwrite this .clasp.json file to run the clasp push to their GAS project.
Steps to Reproduce the Problem
- login with personal gmail account
- create a new Google Sheet and retrieve the GAS project ID through Extensions > Apps Script menu
- Go to Project Settings to retrieve Script ID
- Overwrite the
scriptIDwithin solutions/automations/mail-merge/.clasp.google-only.json - run
clasp pushunder solutions/automations/mail-merge/ directory
But I have no idea how Googlers use these .clasp.json files, so feel free to provide any other idea, thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.